A café is planning to develop a system to manage and calculate the total prices of different types of coffee. The café menu includes American coffee, espresso, cappuccino, and Turkish coffee. The...





A café is planning to develop a system to manage and calculate the total prices of different types of coffee. The café menu includes American coffee, espresso, cappuccino, and Turkish coffee. The customer can order his/her favorite coffee type from the cashier, who will use the system to input the order. Based on the order, the cashier can specify the size of the coffee (small, medium, or large). The prices of the coffee are as follows:


American coffee price is 3.5 JD.
Espresso price is 1.75 JD.
Cappuccino price is 4.25 JD.
Turkish coffee price is 2.5 JD.
The customer can also have some additives on his/her cup of coffee. The additives with their prices include: The milk price is 1.1 JD.


The flavor price is 2.1 JD.
The diet price is Sweetener 2.4 JD.
The decaffeinated coffee price is 5.5 JD.
The foam price is 0.3 JD.
On the total price, 16% tax will be added.
The customer can pay either in cash or by credit card. If cash, the cashier will confirm the payment by the system. If by credit card, the customer swipes the credit card, and the bank confirms the payment. Customers of the café are interested in the offers provided by the café. Accordingly, each customer can leave his/her mobile number to receive a message once an offer is available. In this case, the customer will enter the website of the café and register using his mobile number. Registration includes entering the first name, last name, email address, age, and mobile number. However, email address and age are optional information as the customer can skip entering them. The other information is mandatory. The offer is of type string. An example of an offer is “Buy One Get One Free”.





In the future, the café is thinking of removing or adding some other types of coffee depending on the demand. The manager of the café can use the system to add or remove coffee types.


For the above scenario,




  1. Draw a suitable Class diagram using appropriate SOLID principles and design patterns.




  2. For each used SOLID principle and design pattern, mention where you have used it and why.









Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here