Implement following classes (this is inheritance hierarchy, you can ignore creating inheritance for this test). Add the data members as required/mention ed in the UML class diagram and in the constructors. Employee name : std:string + Employee() + Employoe(std:string) + set name(std:string) + get.name() : std:string HourlyEmployee SalariedEmployee - hourly wage : double hours.worked : double - annual.salary : double + HourlyEmployee( ) + HourlyEmployee( name : std:string, hourly.wage : double ) + set hours.worked( double ) + get hours.worked() : double + weekly-pay ( ) : double + SalariedEmployee() + SalariedEmployee( name : std:Sstring, annual salary : double ) + weekly pay (): double Manager |- weekly.bonus : double + Manager() + Manager(name : std:string, annual.salary : double, weekly bonus : double) + weekly-pay () : double

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter11: More Object-oriented Programming Concepts
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question
100%

please use the picture below to answer the following question

QUESTION 2

use c++ to Implement following classes (this is inheritance hierarchy, you can ignore creaƟng inheritance for this test).

Add the data members as required/menƟoned in the UML class diagram and in the constructors.

QUESTION 2
Implement following classes (this is inheritance hierarchy, you can ignore creating inheritance for this test).
Add the data members as required/mention ed in the UML class diagram and in the constructors.
Employee
name : std:string
+ Employee()
+ Employee(std:string)
+ set name(std:string)
+ get.name() : std:string
HourlyEmployee
SalariedEmployee
- hourly wage : double
hours.worked : double
- annual.salary : double
+ HourlyEmployee( )
+ HourlyEmployee( name : std:string,
hourly wage : double )
+ set hours.worked( double )
+ get hours.worked() : double
+ weekly-pay () : double
+ SalariedEmployee()
+ SalariedEmployee( name : std:Sstring,
annual salary : double )
+ weekly-pay () : double
Manager
- weekly bonus : double
+ Manager()
+ Manager(name : std:string, annual.salary
: double, weekly_bonus : double)
+ weekly-pay (): double
Transcribed Image Text:QUESTION 2 Implement following classes (this is inheritance hierarchy, you can ignore creating inheritance for this test). Add the data members as required/mention ed in the UML class diagram and in the constructors. Employee name : std:string + Employee() + Employee(std:string) + set name(std:string) + get.name() : std:string HourlyEmployee SalariedEmployee - hourly wage : double hours.worked : double - annual.salary : double + HourlyEmployee( ) + HourlyEmployee( name : std:string, hourly wage : double ) + set hours.worked( double ) + get hours.worked() : double + weekly-pay () : double + SalariedEmployee() + SalariedEmployee( name : std:Sstring, annual salary : double ) + weekly-pay () : double Manager - weekly bonus : double + Manager() + Manager(name : std:string, annual.salary : double, weekly_bonus : double) + weekly-pay (): double
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage