Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve and attach the UML diagram showing only the classes exist in the below problems C++ language Problem 2 We aim to create a system

Solve and attach the UML diagram showing only the classes exist in the below problems

C++ language

image text in transcribedimage text in transcribedimage text in transcribed

Problem 2 We aim to create a system for a restaurant. A restaurant has a list of Waiters, Chefs , and Orders. 1- The Waiter class: Every waiter has a Name, ID and a list of Orders (Assigned to him/her by the user of the system), and performs a number of orders The Waiter class should have a default constructor and a parameterized constructor. The Waiter has -but not limitedto - the following functions: - SetName() SetId() GetName() - GetId() AssignOrders() This function aims to assign the orders for a given waiter. It is usually called in the main function to assign a set of orders for him/her. DeliveredOrders() This function indicates the delivered orders to the customers. It flags what orders are delivered CheckStatus() This function checks the status of the orders inquiring if they have been delivered to the customer or not. 2- The Order class: 2- The Order class: The Order class contains all the details about the order including: - OrderID - TableNumer - Ready: Indicates whether the order is done by the chef and ready to be delivered. - Ordered_food: The type of food being ordered. - Delivered: Indicates whether the order has been delivered to the table or not. The Order has the following: - A Default Constructor setting the ID, Ordered food to empty strings, The delivered and ready status to false, and the TableNumber to -1. - A Parameterized Constructor indicating the order details assigned by the user in the main.cpp And assigns delivered and ready to False. MarkDelivered() This function marks a given order as delivered. This function may be used to in conjunction with Delivered Orders() in the waiter's class. IsDelivered() Returns true if the order was served to the customer. This function may used in conjunction with CheckDelivered() function in the Waiter's class. IsReady() Returns true if the order was marked ready by the chef. This function may be used in conjunction with CheckReady() function in the Chef class. MarkReady) Marks the order as ready to be served by the waiter. This function may be used in conjunction with Cooked Orders() in the chef class. OrderDetails() Prints the details of the order. It interacts with the user in a friendly way to get the user's order details. 3- The Chef Class: 3- The Chef Class: A chef has a name, ID, a number of orders, and a list of orders assigned to him her. The Chef has the following functions: SetName() - SetiD() - GetName() GetId() AssignOrders() This function assigns the number of orders to the chef. - CookOrders() This function loops over the orders assigned to a chef and marks them as ready for delivery. The function is used in conjunction with MarkReady(). Also, it prints the details of the cooked orders. CheckCooked() This function checks the number of cooked orders by every Chef. This function may be used in conjunction with CheckReady() in the Order class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

Students also viewed these Databases questions

Question

Does it avoid use of underlining?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago