Answered step by step
Verified Expert Solution
Link Copied!

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++

image text in transcribed

image text in transcribed

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 necessary

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago