Include comments through out code to say what the important


A family run restaurant has 6 employees - an owner, two chefs, and three waiters. The owner pays himself a base salary of $15,000/month and partakes of 60% of the profit every month. The chefs each have a salary of $10,000/month along with a 20% share, each in every month's profit. The waiters have a monthly salary of $3000 each in addition to the money they make in tips. Create a database of these 6 employees which has the following information about each of them :
Name, Employee ID, Employee class ('O' for owner; 'C' for chef and 'W' for waiter), and Salary. In addition, the chefs should have their cuisine of expertise listed in the database (for example, "Italian" for Chef 1 and "French" for Chef 2) and the waiters should have their years of service to the restaurant listed in their database entry (for example, 3 for W1, 5 for W2, 7 for W3)

The primary objective of this program is to be able to view the statistics of the employees, especially their salaries.

Using the concept of inheritance and polymorphism you are required to design this database. You are also required to write a driver program that tests the functionalities of the database. Run your program to output the statistics of each of these 6 restaurant employees for a month where the restaurant saw a profit of $6000 and the three waiters earned $1000, $1500 and $1700 in tips respectively.

Some ideas:
One way to implement this database is to have an array of pointers pointing to Employee objects. You will obviously require a function named Calculate_salary() which will be different for each employee class.

Another implementation could be using a Linked List. Create a node which is a pointer to an object of type Employee.

Write code in c++
Include comments through out code to say what the important lines of code do.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Include comments through out code to say what the important
Reference No:- TGS0117614

Expected delivery within 24 Hours