ok so I did what you said, but i am still a little lost. The
word Meal after the equals sign does not work, why?? Also, once I fix that how can I calculate the customers total? should i use a for loop or indexof method?? or what...... can you show me an example. Thanks!
package final2;
/**
*
* @author kyriakhskiathitis
*/
import java.util.Scanner;
public class Main {
public static void main(
String[] args) {
String Mealm1 = new Meal("Peperoni Pizza", 9.99);
String Mealm2 = new Meal("Onion Rings", 4.55);
String Mealm3 = new Meal("Plain Pizza", 7.99);
String Mealm4 = new Meal("Plain Steak", 5.20);
String Mealm5 = new Meal("Cheese Steak", 6.00);
String Mealm6 = new Meal("French Fries", 2.25);
String Mealm7 = new Meal("Mozzarella Sticks", 4.79);
String Mealm8 = new Meal("20 ounces Bottled Soda-Any", 1.85);
String Mealm9 = new Meal("Cheese Cake plain", 2.50);
String Mealm10 = new Meal("Cherry Cheese Cake", 2.50);
System.out.println(Mealm1);
System.out.println(Mealm2);
System.out.println(Mealm3);
System.out.println(Mealm4);
System.out.println(Mealm5);
System.out.println(Mealm6);
System.out.println(Mealm7);
System.out.println(Mealm8);
System.out.println(Mealm9);
System.out.println(Mealm10);
Scanner keyboard=new Scanner(System.in);
System.out.println("Please enter your items");
String answer=keyboard.nextLine();
int sum=0;
int i=0;
for( i=0; i<sum; i++)
{
if(sum!=0)
{
System.out.println("You have entered nothing.");
}
else
{
//calculate the order total.
}
}
}
}