Implement database having array of pointers

Assignment Help C/C++ Programming
Reference no: EM1352130

Q1) 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. "

Reference no: EM1352130

Questions Cloud

Certain return without any risk : Many potential investors feel CD's are safe investments as well. Certificates of Deposit provides varying interest rates based on a time period of investment.
Organizational behavior - leadership : Leadership. Given a situation where a manager has not been successful using a particular leadership approach, analyze the situation and identify
Explain the firm and tell us why it isn''t responsive : Explain the firm and tell us why it isn't responsive and What are the consequences if a firm chooses to ignore such stakeholder groups
Group vs team and types of communication : Group vs Team and types of communication - Describe classroom communication in terms of the basic communication process
Implement database having array of pointers : 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. Write code in c++
Influence of watching tv on children : Knowing this information, what advice would you give to a parent that asked your opinion about letting their children watch TV?
Determine the total estimated uncollectibles : Hachey Corporation has accounts receivable of $95,100 at March 31, 2007. An analysis of the accounts shows these amounts.
Explain history of mcdonald corporation : Explain How useful is the history of McDonald Corporation is helping to understand the issues it faces now and the possible strategies
Employee or independent contractor : Employee or independent contractor - Factors that distinguishes an employee from an independent contractor.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

  Implement the delivery company

Implement the delivery company using the classes given in the class diagram above.

  Techniques for information hiding and encapsulation

What techniques did you utilize for information hiding and encapsulation? Are there any improvements you would make? If so, what would they be?

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Base process which communicate with child processes

Write a program which has a "base process" which communicates with child processes acting as "bombers" that it creates.

  Write a complete c++ program

The main program will read in a parameter value n (read this in main). Then it will call a function read2arrays (details below) to read lists of grades into two arrays, which the main program will call test1 and test2 (or some other names of your ..

  Program to translates letter grade into number grade

In C++ (should be able to compile in Visual Studio 2010): Write a program to translates letter grade into number grade. Letter grades are A,B,C,D and F, possibly followed by a + or -.

  You will create a linked list module

You will create a linked list module that exactly meets the specifications given in the supplied header (.h) file. The playlist program must accept a filename on the command line (argv).

  Write a program to calculate existing angles

Write a program to calculate existing angles and do if and then from this, and to place fixed angles at certain position.

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

  Computer programming using c language lab

Computer programming using c language lab

  Implementation of sorting technique

Implementation of sorting technique

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd