ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 19 May 2017 My Price 8.00

Modify the Employee class to call display

Had issues with applying in vs. Details attached below.

 

The only change to the Employee class is that there is a new attribute:+benefit : BenefitNotice that there is a "+" for this attribute, meaning that it is public. Make sure to examine themulti-arg constructor's signature!Also, the dotted directed line between Employee and iEmployee specifies that the Employeeclass must implement the iEmployee abstract class, and thus provide an implementation for thecalculatePay method.1.Using the UML Diagrams from Step 1, create the Benefit class. To get an idea of how toformat displayBenefits, take a look at the output in Step 5.2.Add a Benefit attribute to the Employee class.3.Initialize the new Benefit attribute in both Employee constructors. Again, take note of themulti-arg constructors parameter list!4.Create the iEmployee interface (abstract class in C++).5.Modify the Employee class to implement the new interface so that Employee will have toimplement the calculatePay method.6.Modify the Employee class to call displayBenefit when displaying Employeeinformation.Notice that the Employee class now has a public benefit object inside it. This means that you canaccess the set methods of the Benefit object with the following code:<Employee object>.benefit.<method>As an example, to set the lifeInsurance attribute inside an Employee object called emp, we couldexecute the following code:emp.benefit.setLifeInsurance(lifeInsurance);The steps required to modify the Main class are below. New steps are in bold.1.Create an Employee object using the default constructor.2.Prompt for and then set the first name, last name, and gender. Consider using yourgetInput method from Week 1 to obtain data from the user for this step as well as Step 3.

Attachments:

Answers

(11)
Status NEW Posted 19 May 2017 12:05 AM My Price 8.00

-----------

Attachments

file 1495154293-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)