Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please can you tell me the right option , no need of an explanantion just dont wanna get my thinking wrong i worked it out
please can you tell me the right option , no need of an explanantion just dont wanna get my thinking wrong i worked it out i wanna see if u get the same as me.
tenhnician.cpp
#include "Technician.h"
Technician::Technician(string lab)
{
this -> lab = lab;
}
string Technician::getLab()
{
return lab;
}
void Technician::setSalary()
{
salary = 40000;
}
void Technician::giveRaise()
{
salary *= 1.05;
}
techncian.h code below
#ifndef TECHNICIAN_H
#define TECHNICIAN_H
#include "Employee.h"
class Technician: public Employee
{
private:
string lab;
public:
Technician(string);
string getLab();
void setSalary();
void giveRaise();
};
#endif
sales.cpp code below
#include "Sales.h"
Sales::Sales(string dept)
{
this -> dept = dept;
}
string Sales::getDept()
{
return dept;
}
void Sales::setSalary()
{
salary = 50000;
}
void Sales::giveRaise()
{
salary *= 1.1;
}
sales .h code below
#ifndef SALES_H
#define SALES_H
#include "Employee.h"
class Sales: public Employee
{
private:
string dept;
public:
Sales(string);
string getDept();
void setSalary();
void giveRaise();
};
#endif Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started