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

  Give students practice in writing and calling their function

To give students practice in writing and calling their own functions. To give students practice in implementing and planning complex programs.

  Calculate the component voltages

Calculate the component voltages for the following series resonant RLC circuit

  Prepare a program that uses the pthread library

Prepare a C/C++ program that uses the PTHREAD library to create threads and mutexes to synchronize them.

  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.

  Recognition of the problem by the hsbc

What problem did the HSBC face in this case? What people, technology, and the organization factors were responsible for problem? Did HSBC management correctly recognize the problem?

  Program to print out invalid number to character

The integer must contain 3 distinct non-zero number, or the program will print out invalid number.it should print out invalid query.

  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.

  Create a template class

Create a template class, SVector, that implements a constructor

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  A hierarchical jpeg encode decoder for greyscale images

This project is to develop a program that implements a hierarchical JPEG encoder/decoder for greyscale images.

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

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