1.) Construct a Class definition to represent an employee of a company. Each emp
ID: 1852431 • Letter: 1
Question
1.) Construct a Class definition to represent an employee of a company. Each employee is defined by an integer ID number, a double-precision pay rate, and the maximum number of hours the employee should work each week. The class should provide these services:the capability to enter data for a new employee, the capability to change data for a new employee, and the capability to display existing data for a new employee. 2.) Include the class definition created above in a working C++ program that asks the user to enter data for three employees and then displays the entered data.Explanation / Answer
#include #include using namespace std; class Employee { private: double id; double pay; double hours; public: Employee (double = 0.0, double = 0.0, double = 0.0); void showEmp(); void setNewEmp(double,double,double); }; Employee::Employee(double i,double p, double h) { id = i; pay = p; hours = h; } void Employee::showEmp() { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.