Question: Lab 2(JAVA). Requirements: Create a program that serves as a storefront The following items will be for sale Ice Cream $1.25 Burger $3.50 Hot Dog
Lab 2(JAVA).
Requirements:
Create a program that serves as a storefront
The following items will be for sale
Ice Cream $1.25
Burger $3.50
Hot Dog $4.00
Fries $2.50
Slice of Cake $6.75
The program will present a menu with the following options:
List items in cart
Display all items here along with their price.
Display the total cost
Add item to cart
they select it, display a confirmation of purchase text
Checkout
Print all the items and their price in the order as well as the total price, ask user to pay
If the payment is too small, reject and ask again
If payment is enough, inform the user what their change is(if any) and return to the main menu.
Each option will be a numeric value starting at 1
1. List Items in Cart
2. Add Item to Cart
3. Checkout
The main function must be inside of a class called Main.
If your program can be crashed, you will receive a 25 point deduction. This is to say, you should not trust user input. If a user enters an incorrect input, you should notify them of the error and ask them to enter the input again
Supply a scanned UML Class Diagram that details your design.
Include the class that will contain main
Grade Breakdown:
Correct Price and Change Calculation = 15 Points
Correct Input Handling = 15 Points
Correct Menus = 15 Points
Correct Class Diagram = 30 Points
Quality of Design = 25 Points
Total = 100 Points
ADDITIONALLY DO ALSO THIS.....
Requirements:
Create a program that satisfies all the requirements of Lab 2 and the following
The following additional items will be for sale
Burger and Fries Combo
The price should be equal to the combined process of Burger and Fries. This shouldnt be a hardcoded thingIf the price of burger and fries changes, this code shouldnt have to be rewritten.
Hot Dog and Fries Combo
The price should be equal to the combined process of Hot Dog and Fries. This shouldnt be a hardcoded thingIf the price of burger and fries changes, this code shouldnt have to be rewritten.
Incorporate the Composite Pattern
Supply a scanned UML Class Diagram that details your design.
Include the class that will contain main
Grade Breakdown:
Correct Implementation of Composite Pattern = 45 Points
Correct Class Diagram = 30 Points
Quality of Design = 25 Points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
