Question: below i have written two simple questions went through it myself but i do not know if im wrong or right please can you tell

below i have written two simple questions went through it myself but i do not know if im wrong or right please can you tell me which options do you think it is, i have mention thr codes for both questions below.
many thanks
Q17)))  below i have written two simple questions went through it myself
but i do not know if im wrong or right please can
you tell me which options do you think it is, i have
#include
#include "Employee.h"
#include "Sales.h"
#include "Technician.h"
int totalPay(Employee* list[], int number)
{
int sum = 0;
for (int i = 0; i
sum += list[i]->getSalary();
return sum;
}
void raise(Employee* list[], int number)
{
for (int i = 0; i
list[i]->giveRaise();
}
int main()
{
Employee* payroll[100];
char input;
int staffno = 0;
while(true)
{
cout
cout
cout
cout
cout
cout
cin >> input;
if ( input == 'a' )
{
payroll[staffno] = new Sales("Electronics");
payroll[staffno]->setSalary();
cout getSalary()
staffno++;
}
else if ( input == 'b' )
{
payroll[staffno] = new Technician("A1");
payroll[staffno]->setSalary();
cout getSalary()
staffno++;
}
else if ( input == 'c' )
{
cout
}
else if ( input == 'd' )
{
cout
raise(payroll, staffno);
}
else
break;
}
for (int i = 0; i
delete payroll[i];
return 0;
}
mention thr codes for both questions below. many thanks Q17))) #include #include
Q23))))) coding for it is above please let me know
"Employee.h" #include "Sales.h" #include "Technician.h" int totalPay(Employee* list[], int number) { int
Tos Cirele class detisition and implemenatien are given in the "Fins Necded Fer Coursemonk fram 2. The following testClele cep tile is used with tho Cirele elass: Binclude elostream: Ainclude "Circle h" using rumespace nid, int maind 1 Circle "pCircle = new Circle[25], tee {liti=0,i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!