Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Any help is appreciated just to give me an idea. Language C++ Task 1 Write a C++ class definition for the OrderManager class (in OrderManager.h).
Any help is appreciated just to give me an idea. Language C++
Task 1 Write a C++ class definition for the OrderManager class (in OrderManager.h). This defi- nition must include all relevant data members and member functions to allow for the following functionality set the time taken to prepare an order (assume this is the same for all orders) e allow the client to place orders e store a unique order number for each order placed store the time when an order is placed (time when you start preparation) e allow the client to collect an order if enough time has elapsed from placing the order to collecting (to allow for preparation) Pay attention to which members should be private and which should be public. The client will need to interact with your code. To ensure the client can develop code that will interface with your code the following public functions must appear int placeOrder a function to handle placing an order this should return a unique order number and store the order start time bool collectorder (int orderNumber) -a function to allow for collection of an order if the order is ready (using a given unique order number) once an order is collected you w want to rmove t from the list of orders you are storing. Return true if a collection is successul and false if it is not (whatever the reason may be) bool setPrepareTime (double seconds) a function to set the preparation time for a restaurant return true is time is updated correctly and false if it is not (think about what inputs the time should not be updates to) You MUST incude at least one private function to assist the above public functions. It is up to you what this function may It is up to you to decide what additional functions are needed to implement the functionality required. be. You may include more than one private function if necessary Task 1 Write a C++ class definition for the OrderManager class (in OrderManager.h). This defi- nition must include all relevant data members and member functions to allow for the following functionality set the time taken to prepare an order (assume this is the same for all orders) e allow the client to place orders e store a unique order number for each order placed store the time when an order is placed (time when you start preparation) e allow the client to collect an order if enough time has elapsed from placing the order to collecting (to allow for preparation) Pay attention to which members should be private and which should be public. The client will need to interact with your code. To ensure the client can develop code that will interface with your code the following public functions must appear int placeOrder a function to handle placing an order this should return a unique order number and store the order start time bool collectorder (int orderNumber) -a function to allow for collection of an order if the order is ready (using a given unique order number) once an order is collected you w want to rmove t from the list of orders you are storing. Return true if a collection is successul and false if it is not (whatever the reason may be) bool setPrepareTime (double seconds) a function to set the preparation time for a restaurant return true is time is updated correctly and false if it is not (think about what inputs the time should not be updates to) You MUST incude at least one private function to assist the above public functions. It is up to you what this function may It is up to you to decide what additional functions are needed to implement the functionality required. be. You may include more than one private function if necessaryStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started