Question: Save your file! Step 2 Create a C++ project, and call it Week 5-Inheritance. Now, let's realize the UML class diagram, which means let's take

 Save your file! Step 2 Create a C++ project, and call
it Week 5-Inheritance. Now, let's realize the UML class diagram, which means
let's take the UML class Create an Employee class using a separate

Save your file! Step 2 Create a C++ project, and call it Week 5-Inheritance. Now, let's realize the UML class diagram, which means let's take the UML class Create an Employee class using a separate header file and implementation file o Review your UML class diagram for the attributes and behaviors . The calculatePay() method should return O.of . The toString0 method should return the attribute values (state of the objecr). Create an Hourly class using a separate header file and implementation file. o The Hourly class needs to inherit from the Employee class The calculatePay0 method should return the pay based on the number of hours worked and the pay rate. Remember to . Create a Salary class The Salary class needs to inherit from the Employee class. The calculatePay) method should return the annualSalary divided by 52.0f because there are 52 weeks in the year Create a Manager class using a separate header and implementation file. The Manager class needs to inherit from the salary class (yes, a Chid class can be a Parent class). oThe calculatePay) method should use the Salary's calculatePay) method plus the bonus divided by 52.0f (base pay plus bonus) Step 3 Let's test our classes. Add a Source.cpp file to your project

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!