subject

Given the following class definition: class employee
{
public:
employee();
employee(string, int, double);
employee(int, double);
employee(string);

void setData(string, int, double);
void print() const;
void updatePay(double);
int getNumOfServiceYears() const;
double getPay() const;

private:
string name;
int numOfServiceYears;
double pay;
};

Create a class parttime derived from the above class that includes private members payRate and hoursWorked of type double along with a constructor and the definition of a print function that prints out all information from the base and derived class. Provide a test program that would demonstrate the working parttime class.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i.e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
What is the main difference between cloud computing and saas? cloud computing is a platform, and saas is software. cloud computing is software, and saas is a platform. cloud computing is a service, and saas is software. cloud computing is a service, and saas is a platform.
Answers: 1
You know the right answer?
Given the following class definition: class employee
{
public:
employee();
...
Questions
question
Biology, 14.03.2020 17:12
question
History, 14.03.2020 17:12
question
History, 14.03.2020 17:13
question
Mathematics, 14.03.2020 17:15
question
Mathematics, 14.03.2020 17:16
question
English, 14.03.2020 17:36