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

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Main function to input twenty integers in given range

Write a main function to input 20 integers in range of 1-6, function should count number of times the numbers 2 and 5 occur. function must declare statics variables count2 and count5.

  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.

  Execute tests and repetitions

Read data from standard input and store them in an array, Execute tests and repetitions

  Write a program that converts between app and ppm values

Write a simple program that converts between APP and PPM values

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

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  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.

  Iterative programming problem solving approaches

Write a recursive function void reverse ( ) that reverse a sentence

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

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