Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Can Someone aid me in my conversion quest?

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can Someone aid me in my conversion quest?

    Hello, first off I am not quite sure if I am in the right section to be posting this. Second off I need help turning this .java file into an exe file so it can be used at any computer without any additional programs other than the cmd prompt. I have looked up countless tutorials and explanations and nothing works or makes sense to me. It would be greatly appreciated if someone could possibly do it for me and link a download for it. However, at the very least, explain to me step by step how to do it. Thanks in advanced

    Here is the code:

    //Nicholas Frechette's program.

    import TerminalIO.KeyboardReader;
    import java.text.DecimalFormat;

    class copyprice {

    public static void main(String args[]) {

    KeyboardReader reader = new KeyboardReader();
    DecimalFormat threeDecimal = new DecimalFormat("0.00");



    double a, m;
    double A = 0.16, B = 0.2, C = 0.58, D = 0.4, E = 0.23;

    char ans;

    System.out.println("Would you like to intiate the program? (Y or N)");

    ans = reader.readChar();

    while(ans == 'Y') {

    System.out.println("How many pages do you need printed?");

    a = reader.readDouble("");

    if(a<21 && a>0){

    m = a*(1+(A));

    System.out.println("Cost of " + a + " copies is $" + threeDecimal.format(m) + ".");
    System.out.println("");
    System.out.println("");

    }

    if(a>20 && a<51){

    m = (23+(B)) + ((a-20)*(C));

    System.out.println("Cost of " + a + " copies is $" + threeDecimal.format(m) + ".");
    System.out.println("");
    System.out.println("");

    }

    if(a>50){

    m = (23+(B)) + (17+(D)) + ((a-50)*(E));

    System.out.println("Cost of " + a + " copies is $" + threeDecimal.format(m) + ".");
    System.out.println("");
    System.out.println("");

    }

    System.out.println("Would you like to rerun the program? (Y or N)");

    ans = reader.readChar();
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");
    System.out.println("");


    }

    }


    }


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Can Someone aid me in my conversion quest?

    exe file so it can be used at any computer
    exe files only work on one type of OS.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Can Someone aid me in my conversion quest?

    I meant any kind of Windows computer, I shouldve specified I only meant specifically for windows. Main point being I only need one file to fully run the program and can be run within a default program already installed on that computer.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Can Someone aid me in my conversion quest?

    What you are asking about is not part of java.
    I think there are 3rd party programs. Ask a search engine.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Chat security. pursuing aid.
    By Dunkelheit in forum Object Oriented Programming
    Replies: 0
    Last Post: April 11th, 2012, 05:41 AM
  2. Help with conversion
    By TheEvilCouncil in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 2nd, 2012, 08:29 PM
  3. Simple Text Quest Help
    By cshaffer123 in forum Java Theory & Questions
    Replies: 7
    Last Post: January 18th, 2012, 12:27 AM