JAVA
JAVA
JAVA
import java.util.Scanner;
}
System.out.println("Your total is: $" + price);
}
public static void fishFilet(){
}
public static void chickenNugget(){
}
public static void hamburgerMeal(){
}
public static void main(String[] args){
Scanner scan = new Scanner (System.in);
System.out.println("Welcome to Mcdonalds!\n");
menu();
System.out.println("What would you like from the menu?(1 -
4)\n");
int userInput = scan.nextInt();
if (userInput == 1){
bigMacMeal(scan, userInput, userInput);
}
if (userInput == 2){
fishFilet();
}
if (userInput == 3){
chickenNugget();
}
if (userInput == 4){
hamburgerMeal();
}
double bigMac = 3.49;
double fishFil = 3.89;
double hamburger = .79;
double chickenNuggets = 3.53;
double fries = 1.89;
double superFries = 2.89;
double drink = 1.10;
double superDrink = 2.52;
double tax = .065;
}
}
ORDINARY FAST FOOD
*/
package javaapplication22;
/**
* @author Student
*/
import java.util.Scanner;
System.out.println("Welcome \n1. Burger (Php 50.00 ) \n2. Fries (Php 45.00 )\n3. Soda (Php 20.00)
\n4. Done");
if (foodItem == 1) {
itemPrice = 50.00;
if (foodItem == 2) {
itemPrice = 45.00;
if (foodItem == 3) {
itemPrice = 20.100;
quantity();
return itemPrice;
System.out.println("Enter quantity");
subTotal(quantity, itemPrice);
return quantity;
return subTotal;
}
public static void done(double runningTotal) {
ordering = false;
System.out.println(runningTotal);
int menuOption;
int foodItem = 0;
do {
double runningTotal = 0;
menu();
menuOption = input.nextInt();
switch (menuOption) {
case 1:
foodItem = 1;
itemPrice(foodItem);
break;
case 2:
foodItem = 2;
itemPrice(foodItem);
break;
case 3:
foodItem = 3;
itemPrice(foodItem);
break;
case 4:
done(runningTotal);
break;
default:
System.out.println("Invalid option.");
} while (ordering);
subTotal(quantity(), itemPrice(foodItem));