Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Ex 1. Driver Class Implement Class driver as described in the UML diagram above. Ex 2. Order Class Implement Class Order as described in

C++

image text in transcribedimage text in transcribedimage text in transcribed

Ex 1. Driver Class Implement Class driver as described in the UML diagram above. Ex 2. Order Class Implement Class Order as described in the UML diagram above. Notice that, driver, customer, date protected and not private in this class. Ex 3. RestaurantOrder class Implement class RestaurantOrder, which inherits from class order . Note the following: 1- Parameterized constructor that receives all data members including data members in the base class. 2- print details () of the base class should be overridden to print the additional information about the restaurant name and meal name . Ex 3. MertOrder class Implement class MertOrder, which inherits from class order . Note the following: 1- Parameterized constructor that receives all data members including data members in the base class. 2- In calculate total (), you have to sum all the prices of the items and store the result in price. 3- print details () of the base class should be overridden to print the additional information about the items and items price. 4- There are three things that must be defined inside the MertOrder class that are not explicitly requested and must exist. What are they? Define two of them within the class. Ex 4. Driver Implement a driver program to test your code. 1- Create an object of type Date, Customer, Driver 2- create an object of type Order using created in 1. 3- create an object of type RestaurantOrder and MertOrder . 4- set the price of RestaurantOrder object to 50. 5- print the detail of order object and MertOrder object. 6- if you use private or protected inheritance, which part of your code is going to be wrong? why ? Answer this part as a comment in your main

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

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions

Question

(a) What is the complete defining relation? Pg45

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago

Question

List out some inventory management techniques.

Answered: 1 week ago