Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java Small Restaurant

Bowdrie85
Bowdrie85 


Java restaurant program that runs in JGrasp. Displays menu to place food orders. Must have 5 dishes. Option for profit report(Should show how many of each dish was sold). Option to show current ingredient stock and restock ingredients. Option to show subtotal + sales tax and total price. Each dish must use 3 ingredients. Ingredients should be stored in arrays. Ingredients must decrement when used for dishes. This ties with restock menu. Validation check to make sure a dish can be made with available ingredients. Ensure enough ingredients are remaining. Must use classes, objects, arrays, decisions, loops and methods. No GUI interface is required Attachments
Tags Clarifications

Answers

Java Restaurant Program

SW_wizard
SW_wizard 



Source code and a screenshot is attached Attachments
JavaRestaurant.zip (93 K) Download
Preview
dishIngredient = new String[3]; dishIngredient[0] = "potato"; dishIngredient[1] = "tomato"; dishIngredient[2] = "cheese";

Preview
$4.0"); System.out.println("3. Salad -- $3.0"); System.out.println("4. Burger -- $3.5"); System.out.println("5. Sandwich -- $3.0"); } //check if there are enough ingredients to take the order of the respective dish public boolean validateOrder(int num, Ingredients[] ing){ boolean flag = true; for(int i=0; i<3;

Preview
" -- " + count); } public void refillStock(int num){ count = count +

Preview

Preview
price = 4.0; //number = num; } public void display(){ System.out.println("Pasta

Preview
dishIngredient[2] = "chicken"; price = 4.5; //number = num; }

Preview
int opt = scan.nextInt(); switch(opt){ case 1: //current ingredient stock System.out.println("Current ingredient stock: "); for(int i=0; i<ing.length; i++){ ing[i].currentStock(); } break; case 2: //restock ingredients System.out.println("List of ingredients with current stock"); while(true){ for(int i=0;

Preview
price = 3.0; //number = num; } public void display(){ System.out.println("Salad--

Preview
Dishes { public Sandwich(){ dishIngredient = new String[3]; dishIngredient[0] = "bread";

Screenshots
Screenshot
Purchase Answer