2023 STEP 3 Modify the Employee Class Using the UML Diagrams from Step 1 create the Benefit class To get | Assignment Collections

Computer Science 2023 CIS247_Week4Lab Solution

2023 STEP 3 Modify the Employee Class Using the UML Diagrams from Step 1 create the Benefit class To get | Assignment Collections

STEP 3: Modify the Employee Class
 
Using the UML Diagrams from Step 1, create the Benefit class. To get an idea of how to format displayBenefits, take a look at the output in Step 5.
Add a Benefit attribute to the Employee class.
Initialize the new Benefit attribute in both Employee constructors. Again, take note of the multi-arg constructors parameter list!
Create the iEmployee interface (abstract class in C++).
Modify the Employee class to implement the new interface so that Employee will have to implement the calculatePay method.Modify the Employee class to call displayBenefit when displaying Employee information.
STEP 4: Modify the Main Method
 
Notice that the Employee class now has a public benefit object inside it. This means that you can access the set methods of the Benefit object with the following code:.benefit.
As an example, to set the lifeInsurance attribute inside an Employee object called emp, we could execute the following code:emp.benefit.setLifeInsurance(lifeInsurance);
The steps required to modify the Main class are below. New steps are in bold.Create an Employee object using the default constructor.
Prompt for and then set the first name, last name, and gender. Consider using your getInput method from Week 1 to obtain data from the user for this step as well as Step 3.
Prompt for and then set the dependents and annual salary using the overloaded setters that accept Strings.
Prompt for and set healthInsurance, lifeInsurance, and vacation.
Using your code from Week 1, display a divider that contains the string “Employee Information”.
Display the Employee Information.
Display the number of employees created using getNumEmployees(). Remember to access getNumEmployees using the class name, not the Employee object.
Create a Benefit object called benefit1 using the multi-arg construction. Use any information you want for health insurance, life insurance, and vacation.
Create another Employee object and use the constructor to fill it with the following:
“Mary”, “Noia”, ‘F’, 5, 24000.0, benefit1
Using your code from Week 1, display a divider that contains the string “Employee Information”.
Display the employee information.
Display the number of employees created using getNumEmployees(). Remember to access getNumEmployees using the class name, not the Employee object.

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational