Computers and Technology
Computers and Technology, 14.06.2021 19:50, Kitkatuu

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();
{

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, deathfire5866
Determine whether the following careers would require training or college.
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, briannaleiigh
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
image
Computers and Technology, 22.06.2019 21:50, IdkHowToDoMath
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
image
Computers and Technology, 22.06.2019 23:00, brookerebman15
Which type of tab stop is most for weights and measurements?
Answers: 1
Do you know the correct answer?
Design a class named Employee. The class should keep the following information in member variables:...

Questions in other subjects:

Konu
History, 13.02.2021 03:50
Konu
Mathematics, 13.02.2021 03:50
Konu
Mathematics, 13.02.2021 04:00