Implement a simple inheritance hierarchy

Assignment Help Basic Computer Science
Reference no: EM131498803

Question: Objective: The main goal of this last homework is to implement a simple inheritance hierarchy between the Person and Employee class. 

Special instruction: This homework will be credited for a total of 2 bonus pointsThe graders will post your grades on a scale of 100 points, which will be scaled down to 2 bonus points when calculating your final letter grade. 

Description. Declare and implement the Employee class as a derived class of the Person class, which is already implemented in the demo code posted under this week (week #15). Note that your project doesn't need to include the Student class. Please also feel free to modify the Person class. For instance, you can replace the data type for birthday to string. 

Specifically, your project will include Person as the base class, and Employee as the derived class of Person. Your Employee class will include the following data members: 

  1. year of employment (e.g., 2012)
  2. base salary 
  3. a dynamic array to keep track of the annual salary increase rate since the year of employment. For instance, an employee joined the company in year 2013, his salary increase rates in 2014, 2015, and 2016 were 10%, 7%, and 11%, respectively. This dynamic array will then hold the following three numbers: 0.1, 0.07, and 0.11. Furthermore, let bSal be the base salary, the current salary of the above employee should be equal to: bSal*1.10*1.07*1.11. Note that although the size of this array is derivable from the year of employment, you are recommended to include two additional data members to manage the capacity and size of this array. (This is similar to what you did in the previous homework.)

At the minimum, your Employee class needs to include the following function members: 

  • a default constructor 
  • the big-3: destructor, copy constructor and overloaded assignment operator 
  • an accessor to return the current salary of an employee
  • an accessor and mutator for each of the above data members. It's sufficient to return the salary increase rate in a specific year. 
  • an overloaded put operator (<<) to print out all the information in an Employee object 
  • override the output() function in the base class, as this function is virtual in Person.  

Please provide a simple character-based interface to allow the graders to test each of the above member functions. Make sure you test the output() function using Person pointers and observe polymorphism in action.

Submission requirements: Please use separate compilation and submit your source code in one zip files. Your project will include two header files (one for the Person class, the other for the Employee class) and three .cpp files.

Reference no: EM131498803

Questions Cloud

Global tek is new firm in rapidly growing industry : Global Tek is a new firm in a rapidly growing industry. What is the current value of one share of this stock if the required rate of return is 15.5 percent?
List at least three specific kinds of decision entries : What is your company's action plan to achieve a sustainable competitive advantage over rival companies? List at least three (preferably more than three).
What is the purpose of the text : What is the purpose of the text? In other words, what does the author want his or her readers to believe and/or do after reading the article?
Which theory of deviance best applies to this situation : Which theory of deviance best applies to this situation? What happens to the students who were not chosen for this opportunity?
Implement a simple inheritance hierarchy : Question: Objective: The main goal of this last homework is to implement a simple inheritance hierarchy between the Person and Employee class.
Automation of common events : If you were interested in data analysis, calculations, chart management, data management, and automation of common events.
Are these moves primarily offensive or defensive : Live Nation operates music venues, provides management services to music artists, and promotes more than 22,000 live music events annually.
What is the firm required return : what is the firm's required return?
What is the caste system in india : What is the caste system in India? How does the caste system differ from social stratification in many western societies including the US?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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