Question: Step 1 : Download the skeleton code from Bb and unzip the Folder. Step 2 : Upload the files ( two header files, two implementation
Step : Download the skeleton code from Bb and unzip the Folder.
Step : Upload the files two header files, two implementation files, and a driver file into the online compiler.
Step : The skeleton code contains placeholders marked as "implement me You are required to complete the classes and functions in these sections. Follow the instructions in the skeleton code to complete the lab.
Step : Define a Person struct with components firstName and lastName both of type string
Step : Define a class called Employee with the following:
Private data members:
name of type Person
position of type string
baseSalary of type int
Public member functions:
set: Takes parameters to set name, position, and baseSalary. Complete this function where marked "implement me
getBaseSalary: Returns the base salary.
print: Outputs the employee details name position, and base salary
A default parameterized constructor "implement me
Step : Define a class called Manager that publicly inherits from the Employee class. This class has the following:
Private data members:
department of type string
bonusPercentage of type int
specialty of type string
salary of type int
Public member functions:
set: Sets department, bonusPercentage, specialty and inherits set from Employee. Complete the function where marked "implement me
calculateSalary: Calculates the final salary as the base salary plus the bonus percentage.
print: Outputs details of the manager, including department and final salary "implement me
A default parameterized constructor. "implement me
Implement the member functions of both classes where marked "implement me
The following driver produces the given output:
#include "manager.h
int main
Manager Omar;
Omar.setOmar "Ali", "Software Engineer", "Development", "Artificial Intelligence", ;
Omar.print;
return ;
Sample output:
Omar Ali has a Software Engineer degree and hisher salary is
HeShe is specialized in Artificial Intelligence and hisher total salary is
write the c code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
