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

Java Coffee Shop prgram


I need a solution to this programming problem using a Do While loop with Nested Loops for sub menu selections Assignment: Create a Coffee Shop application that uses a while loop to build a customer order. The Coffee Shops sells coffee ($3.25), espresso ($4.25), and tea ($2.75). The coffee selection presents the customer with the choices of iced (no charge), cream (50 cents), and sugar (50 cents). The espresso selection presents the customer with choice of caramel (no charge) and chocolate (no charge) with one shot (no charge) or two shots ($1.25) of espresso. Once the customer is done, he or she will receive a bill of the total price. After each selection, the customer will have the choice of returning to the main menu for additional purchases. Use nested loops to handle customers' submenu selections. Attachments
Tags Clarifications


Java Coffee Shop Program


Attached is the program and screen shot of output. Let me know If you need any changes.
Attachments (25 K) Download

your ESPRESSO?"); System.out.println("\t1 CARAMEL ----- No Charges"); System.out.println("\t2 CHOCOLATE ----- No Charges"); sc.nextInt(); System.out.println("\t3 1 Shot ----- No Carges"); System.out.println("\t3 2 Shots ----- $1.25"); int choice_shot=sc.nextInt(); if(choice_shot==2) { bill+=1.25; } break; case 3: bill+=2.75; break;

Purchase Answer