Question: Programming language is Java. Eclipse Description You are asked to implement a Console application called CoffeeMachine.cs for a Coffee Vending Machine System. It allows customers

 Programming language is Java. Eclipse Description You are asked to implement

a Console application called CoffeeMachine.cs for a Coffee Vending Machine System. It

allows customers to purchase a coffee at a time. The program must

Programming language is Java. Eclipse

Description You are asked to implement a Console application called CoffeeMachine.cs for a Coffee Vending Machine System. It allows customers to purchase a coffee at a time. The program must show the coffees and the corresponding prices of different sizes (small, medium, large) as follows. The program must be able to collect the purchase information from the customer to complete the order. 5% tax should be added when calculating the price after confirmation. Coffee Type Latte Americano Cappuccino Caramel Macchiato Mocha Small Price $3.70 $2.95 $3.70 $3.75 $4.50 Medium Price $4.45 $3.50 $4.55 $4.50 $5.40 Large Price $5.00 $4.10 $5.00 $5.00 $6.00 Sample Run of Program The followings show two sample runs of the program. Sample Run#1 (Green text refers to user input) Welcome to N&I Cafe Please choose your coffee Coffee 1: Latte Coffee 2: Americano Coffee 3: Cappuccino Coffee 4: Caramel Macchiato Coffee 5: Mocha umbar 3 (S)mall: $3.70 / (M)edium: $4.55 / (L)arge: $5.00 >> M Confirm you order (Y/N): Y Thank you for your purchase! Your Medium Cappuccino is ready to serve. Total cost: $4.78 Sample Run#2 Welcome to N&I Cafe Please choose your coffee Coffee 1: Latte Coffee 2: Americano Coffee 3: Cappuccino Coffee 4: Caramel Macchiato Coffee 5: Mocha Enter the coffee number >> 1 Please choose the size (S/M/L): (5)mall: $3.70 / (M)edium: $4.45 / (L) ge: $5.00 >> S Confirm you order (Y/N): N Welcome to N&I Cafe Please choose your coffee Coffee 1: Latte Coffee 2: Americano Coffee 3: Cappuccino Coffee 4: Caramel Macchiato Coffee 5: Mocha Enter the coffee number >> 2 Please choose the size (S/M/L): (S)mall: $2.95 / (Medium: $3.50 / (L) arge: $4.10 >> L Confirm you order (Y/N): N Welcome to N&I Cafe Please choose your coffee Coffee 1: Latte Coffee 2: Americano Coffee 3: Cappuccino Coffee 4: Caramel Macchiato Coffee 5: Mocha Enter the coffee number >> 5 Please choose the size (S/M/L): (S) mall: $4.50 / (M)edium: $5.40 / (L)arge: $6.00 >> L Coffee 1: Latte Coffee 2: Americano Coffee 3: Cappuccino Coffee 4: Caramel Macchiato Coffee 5: Mocha Enter the coffee number >> 5 Please choose the size (S/M/L): (S)mall: $4.50 / (M)edium: $5.40 / (L)arge: $6.00 >> L Confirm you order (Y/N): Y Thank you for your purchase! Your Large Mocha is ready to serve. Total cost: $6.30 Page 2 of 3 Assignment #1 Winter 2022 Additional Requirement and Assumption: . . Zero marks will be given if the program is not able to compile. Your program must be able to produce the same output. o E.g., "(S)mall" and "Small" are considered as different output o "purchase!" and "purchase" are considered as different output You must create a class called Coffee to model a coffee. The class Coffee contains the followings, but not limited to, the following private instance variables: name (String) o largePrice (double) o mediumPrice (double) smallPrice (double) You may assume the user input must be valid. o o

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To implement the Coffee Vending Machine System in Java using Eclipse follow these steps Step 1 Define the Coffee Class Create the Coffee class with th... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!