I seem to be struggling with a c++ class assignment, I'll Provide the instructions below, and my code below the instructions. I have been having technical trouble with using visual studio to get the...


I seem to be struggling with a c++ class assignment, I'll Provide the instructions below, and my code below the instructions. I have been having technical trouble with using visual studio to get the correct output, so please make sure the output is compiled correctly (also have comments explaining what each line does). also, my code apparently has an error that I don't know how to fix properly.


Construct a class named Employee to represent the employee of the company. Each employee is defined by an integer ID number, a double pay rate, and the maximum number of hours an employee should work each week. Write a C++ program that asks the user to enter data for three employees one by one, and displays the entered data on the screen. You must use the concept of objects and constructors with parameters for this part.


my code


#include
#include
#include


using namespace std;


class Employee
{
private:
string IDnumber;
string payrate;
string weeklyhours;
public:
Employee()
{
void add(string, string, string);
void change(string, string, string);
void showValues();
}
Employee(string ID, string rate, string maxHours)
{
IDnumber = ID;
payrate = rate;
weeklyhours = maxHours;
};
string getIDnumber();
string getpayrate();
string getweeklyhours();


void setIDnumber(string ID)
{
IDnumber = ID;
}
void setpayrate(string rate)
{
payrate = rate;
}
void setweeklyhours(string maxHours)
{
weeklyhours = maxHours;
}
const int employee_num = 3;
int main()
{
Employee num[employee_num] = {
{"185970","$15","20"},
{"025637","$19","22"},
{"132010","$17","18"}
};
for (int i = 0; i < employee_num;="">
{
cout < num[i].getidnumber()=""><>
cout < num[i].getpayrate()=""><>
cout < num[i].getweeklyhours()=""><>
}
return 0;
}
};

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here