# Can Someone aid me in my conversion quest?

• April 15th, 2013, 05:05 PM
Nickalahobiboolan
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 java.text.DecimalFormat;

class copyprice {

public static void main(String args[]) {

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)");

while(ans == 'Y') {

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

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)");

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("");

}

}

}
• April 15th, 2013, 05:16 PM
Norm
Re: Can Someone aid me in my conversion quest?
Quote:

exe file so it can be used at any computer
exe files only work on one type of OS.
• April 15th, 2013, 05:28 PM
Nickalahobiboolan
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.
• April 15th, 2013, 05:56 PM
Norm
Re: Can Someone aid me in my conversion quest?