A cafe is planning to develop a system to manage and calculate the total prices of different types of coffee. The cafe 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

A cafe is planning to develop a system to manage and calculate the total prices of different types of coffee.
The cafe 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 USD.
Espresso price is 1.75 USD.
Cappuccino price is 4.25 USD.
Turkish coffee price is 2.5 USD.
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 USD.
The flavor price is 2.1 USD.
The diet price is Sweetener 2.4 USD.
The decaffeinated coffee price is 5.5 USD.
The foam price is 0.3 USD.
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 cafe are interested in the offers provided by the cafe. 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 cafe 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 cafe is thinking of removing or adding some other types of coffee depending on the demand. The manager of the cafe 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 Justfy your design choice. 

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Design of User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education