Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code is done I just need this small modification. Create modified code to include a bonus for salaried employees, and place below along with

The code is done I just need this small modification.

Create modified code to include a bonus for salaried employees, and place below along with a snapshot of the output. [ Hint: bonuses are generally given to salaried employees; have the end - of - year bonus of one - half percent of the annual salary added to the annual salary ] .

#include #include using namespace std;

class Employee{ private: string name; int id; int hoursWorked;

public: Employee(){ this->name = ""; } Employee(string name,int id, int hoursworked){ this->name = name; this->id=id; this->hoursWorked=hoursworked; }

string getName(){ return name; } void setName(string name){ this->name = name; } void printdata(){ cout<<"ID Number "<<"\t"<

class SalaryEmp : public Employee{ private: float salary; float hourlywage; public: SalaryEmp(string name, int id, int hoursworked,float salary, float hourlywage):Employee(name,id,hoursworked){

this->salary = salary; this->hourlywage=hourlywage; }

float getSalary(){ return salary; } void setSalary(float salary){ this->salary = salary; } void print(){

cout<<"Employee Record"<<"\t"<<"Hourly Wage Employee"<

} };

int main(){ SalaryEmp e = SalaryEmp("Sammy Student",805,38,38000.0,10.00);; e.print(); return 0; }

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

Step: 3

blur-text-image

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

How will the reader feel upon reading this?

Answered: 1 week ago

Question

What does stickiest refer to in regard to social media

Answered: 1 week ago

Question

=+ Are unions company-wide, regional, or national?

Answered: 1 week ago

Question

=+j Explain the litigation risks in international labor relations.

Answered: 1 week ago