subject

Design a class named Employee. The class should keep the following information in member variables: Employee name
Employee number
Hire Date
Write one or more constructors and the appropriate accessor and mutator functions for the class.
Next, write a class named ProductionWorker that is derived from the Employee class. The ProductionWorker class should have member variables to hold the following information:
Shift (an integer)
Hourly pay rate (a double)
The workday is divided into two shifts: day and night. The shift variable will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write one or more constructors and the appropriate accessor and mutator functions for the class. Demonstrate the classes by writing a program that uses a ProductionWorker object."
Now I have written out the program, it compiles without errors. However, when I run it It asks the first question "Employees name" after input it errors and closes itself down. Can anyone find where in my code it is causing it to do this please? To be clear, I am not asking for someone to write the program, I have already done this, just need to know why it compiles but does not run all the way through. Thank You!
#include
#include
#include
using namespace std;
class Employee
{
private:
string employeeName;
int employeeNumber;
int hireDate;
public:
void setemployeeName(string employeeName);
void setemployeeNumber(int);
void sethireDate(int);
string getemployeeName() const;
int getemployeeNumber() const;
int gethireDate() const;
Employee();
{

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
Felicia wants to become a head surgeon by december 2013. she designs the career milestones that she would need to complete her goal. by june 2013, she was not licensed. which best describes what she should do?
Answers: 2
question
Computers and Technology, 22.06.2019 01:30
How will you cite information that is common knowledge in your research paper?
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
question
Computers and Technology, 24.06.2019 21:30
Along what line of action can the camera move to follow the movement of actors for screen direction? a. along a 90-degree arcb. along a 120-degree arcc. along a 180-degree arcd. along a 360-degree arc
Answers: 1
You know the right answer?
Design a class named Employee. The class should keep the following information in member variables:...
Questions
question
Mathematics, 19.05.2021 03:00
question
Mathematics, 19.05.2021 03:00
Questions on the website: 13722367