My NetBeans wont run/compile my code!
[CENTER] Code:
import java.util.Scanner;
public class LunchCounter {
public static void main (String[] args) {
//Scanner allows user to enter input.
Scanner input = new Scanner (System.in);
//Declaring doubles of Food Packs, paid in BitCoin; and the double
//total.
double total;
int BitCoinFood1;
int BitCoinFood2;
int BitCoinFood3;
//Printing out statements, and prompting the user for input.
System.out.println("How many lunches do you request? : ");
System.out.println("If you don't want any lunches, input 0!");
//Stating Lunch Item 1 Prices, and using the ints to declare.
System.out.println("Lunch Item 1 - Price: $5.4 BitCoin");
BitCoinFood1 = input.nextInt();
System.out.println("Lunch Item 2 - Price: $6.5 BitCoin");
BitCoinFood2 = input.nextInt();
System.out.println("Lunch Item 3 - Price 7.4 BitCoin");
BitCoinFood3 = input.nextInt();
//Calculating total + display it for user knowledge.
total = totalCost(BitCoinFood1, BitCoinFood2, BitCoinFood3);
System.out.println("The total BitCoin Owed/Due is: " + total);
}
//Written method for double totalCost.
public static double totalCost(int total1, int total2, int total3) {
//Declaring the double's of the total int and amount funding.
double total = 0;
double amount1 = 5.40;
double amount2 = 6.50;
double amount3 = 7.40;
//Equation for calculating the amount of BitCoin owed/due for food.
total = (amount1*total) + (amount2*total2) + (amount3*total3);
//Return total;
return(total);
}
}
What My Decompiler Reports or Does...
http://i.imgur.com/x816V.jpg
Any help? This is too pass my Java class btw.. Any help would be greatly appreciated. Thanks.
Re: My NetBeans wont run/compile my code!
Unless I've missed something, your NetBeans has compiled and is running your program. It appears to be paused, waiting for your input.
If you have any choice in the matter my advice would be don't use NetBeans: compile and run the program from the command line/terminal/console/"dos" prompt. If you don't or are in a big hurry try clicking in that output panel and entrring something. Also use System.out.println() to print useful diagnostic things like "program starting" at the start and "All done!" at the end.
Re: My NetBeans wont run/compile my code!
Bill Nye has been banned for a year for seeking help with cheating.
db
THREAD CLOSED