Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions