Discount Get CIS 247C ALL WEEKS Solution ONLY $83.95 $111.93
CIS 247C Week 1 - C++ Programming [$9.99]
CIS 247C Week 2 - C++ Programming – Object Construction and Dat... [$15.99]
CIS 247C Week 3 - C++ Programming – Overloaded Methods and Stat... [$15.99]
CIS 247C Week 4 - C++ Programming – Composition and Class Inter... [$19.99]
CIS 247C Week 5 - C++ Programming – Composition, Inheritance, a... [$19.99]
CIS 247C Week 6 - C++ Programming – Abstract Class and Polymorp... [$19.99]
CIS 247C Week 7 - C++ Programming - Putting It All Together [$9.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
CIS247 CIS 247 CIS/247 - CIS247C - Week 5 - Lab 5 - iLab 5 - C++ Programming – Composition, Inheritance, and Polymorphism – Guaranteed 100% score
    CIS247 CIS 247 CIS/247 - CIS247C - Week 5 - Lab 5 - iLab 5 - C++ Programming – Composition, Inheritance, and Polymorphism – Guaranteed 100% score

CIS247 CIS 247 CIS/247 - CIS247C - Week 5 - Lab 5 - iLab 5 - C++ Programming – Composition, Inheritance, and Polymorphism – Guaranteed 100% score

$19.99

The objective of the lab is to take the UML Class diagram and enhance last week's Employee class by making the following changes:

Create a class called Salaried that is derived from Employee.

Create a class called Hourly that is also derived from Employee.

Override the base class calculatePay() method.

Override the displayEmployee() method.

iL A B S T E P S

STEP 1: Understand the UML Diagram

Notice the change in UML diagram. It is common practice to leave out the accessors and mutators (getters and setters) from UML class diagrams, since there can be so many of them. Unless otherwise specified, it is assumed that there is an accessor (getter) and a mutator (setter) for every class attribute.

Employee #firstName : string #lastName : string #gender : char #dependents : int #annualSalary : double #benefit : Benefit -static numEmployees : int = 0 +Employee() +Employee(in fname : string, in lname : string, in gen : char, in dep : int, in benefits : Benefit) +static getNumEmployees() : int +CalculatePay() : double +displayEmployee() : void Benefit -healthinsurance : string -lifeinsurance : double -vacation : int +Benefit() +Benefit(in hins : string, in lins : double, in vac : int) +displayBenefits() : void Salaried -MIN_MANAGEMENT_LEVEL : int = 0 -MAX_MANAGEMENT_LEVEL : int = 3 -BONUS_PERCENT : double = 10 -managementLevel : int +Salaried() +Salaried(in fname : string, in lname : string, in gen : char, in dep : int, in sal : double, in ben : Benefit, in manLevel : int) +Salaried(in sal : double, in manLevel : int) +CalculatePay() : double +displayEmployee() : void Hourly -MIN_WAGE : double = 10 -MAX_WAGE : double = 75 -MIN_HOURS : double = 0 -MAX_HOURS: double = 50 -wage : double -hours : double -category : string +Hourly() +Hourly(in wage : double, in hours : double, in category : string) +Hourly(in fname : string, in lname : string, in gen : char, in dep : int, in wage : double, in hours : double, in ben : Benefit, in category : string) +CalculatePay() : double +displayEmployee() : void

STEP 2: Create the Project

Create a new project and name it CIS247C_WK5_Lab_LASTNAME. Copy all the source files from the Week 4 project into the Week 5 project.

Before you move on to the next step, build and execute the Week 5 project.

STEP 3: Modify the Employee Class

Using the updated Employee class diagram, modify the attributes to be protected.

Delete the iEmployee interface class, and remove the reference from the Employee class.

STEP 4: Create the Salaried Class

Using the UML Diagrams from Step 1, create the Salaried classes, ensuring to specify that the Salary class inherits from the Employee class.

For each of the constructors listed in the Salaried class, ensure to invoke the appropriate base class constructor and pass the correct arguments to the base class constructor. This will initialize the protected attributes and update the numEmployees counter.

The valid management levels are 0, 1, 2, and 3, and should be implemented as a constant.

Override the calculatePay method to add a 10 percent bonus for each of the management levels (i.e., bonus percentage = managementLevel * .10). The bonus percentage should be implemented as a constant.

Override the displayEmployee() method to add the management level to the employee information.

STEP 5: Label Title  

Using the UML Diagrams from Step 1, create the Hourly classes, ensuring to specify that the Hourly class inherits from the Employee class.

For each of the constructors listed in the Hourly class, ensure to invoke the appropriate base class constructor and pass the correct arguments to the base class constructor. This will initialize the protected attributes and update the numEmployees counter.

The valid category types are "temporary", "part time", and "full time".

The provided hours must be more than 0 hours and less than 50 hours, and the limits should be implemented as constants.

The provided wage must be between 10 and 75, and the limits should be implemented as constants.

Override the calculatePay method by multiplying the wages by the number of hours.

Override the Employee setAnnualSalary method and set the annual salary by multiplying the weekly pay by 50.

Override the displayEmployee() method to add the category to the hourly employee information.

STEP 6: Label Title

Using previous weeks' assignments as an example, create at least one Employee, Hourly, and Salaried employee.

For each object created, display the number of employees created.

For each object created, write statements to exercise each of the public methods listed in the Class diagram.

For each object created, invoke the object's displayEmployee() method to display the employee's information.

For employee, the following information needs to be displayed:

When done, compile and run your code.

Then, debug any errors until your code is error-free.

Check your output to ensure that you have the desired output, modify your code as necessary, and rebuild.

Below is the complete sample program output for your reference.

Screenshot of program output that reads:

************** Employee 1 **************

Please enter your First Name Nana

Please enter your Last Name Liu

Please enter your Gender F

Please enter your Dependents 2

Please enter your Annual Salary 60000

Please enter your HealthInsurance PPO

Please enter your LifeInsurance 1.5

Please enter your Vacation Days 20

_____________________Employee Information _________________________

First Name: Nana

Last Name: Liu

Gender: F

Annual Salary: 60000.00

Weekly Salary: 1153.85

_____________________ Benefit Information ___________________

Health Insurance: PPO

Life Insurance: 1.50

Vacation: 20 days

Number of employees: 1

************** Employee 2 **************

Please enter your First Name Jackie

Please enter your Last Name Chan

Please enter your Gender M

Please enter your Dependents 1

Please enter your HealthInsurance HMO

Please enter your LifeInsurance 100

Please enter your Vacation Days 16

_____________________Employee Information _________________________

First Name: Jackie

Last Name: Chan

Gender: M

Dependents: 1

Annual Salary: 50000.00

Weekly Salary: 1250.00

_____________________ Benefit Information ___________________

Health Insurance: HMO

Life Insurance: 100.00

Vacation: 16 days

Salaried Employee Management Level: 3

Number of employees: 2

*************** Employee 3 ***************

Please enter your First Name James

Please enter your Last Name Bond

Please enter your Gender M

Please enter your Dependents 0

Please enter your Health Insurance PPO

Please enter your Life Insurance 120

Please enter your Vacation Days 17

_____________________Employee Information _________________________

First Name: James

Last Name: Bond

Gender: M

Dependents: 0

Annual Salary: 100000.00

Weekly Salary: 2000.00

_____________________ Benefit Information ___________________

 

Health Insurance: PPO

Life Insurance: 5.00

Vacation: 17

Employee Category: Unknown

Wage: 40.00

Hours: 50.00

Number of employees: 3

The end of the CIS247C Week 5 iLab.

Press any key to continue…
STEP 7: Label Title

• Capture the Console output window and paste into a Word document.
• Put the zip file and screenshots (Word document) in the Dropbox.
Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the Dropbox, read these Step-by-Step Instructions or watch this Dropbox Tutorial.
See Syllabus “Due Dates for Assignments & Exams” for due date information.

Solution for CIS247 Week 5 Lab 5 in C++, Contain C++ project (Using Visual Studio)

It is 100% correct solution

If you have more questions, please contact me via email support@extutorials.com, i will help you any time

Thank you

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B