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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:30, sheram2010
Acomputer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a series of stored . the processing unit of most modern computers is a(n) . the instructions that tell a computer how to carry out a task are referred to as computer , which are distributed as software. computers run three main types of software: software, system software, and development tools. an example of system software is a computer system, which is essentially the master controller for all the activities that a digital device performs. digital devices are constructed using tiny electronic components that represent data bits as electrical signals. the system unit houses the system board, which contains several circuits made from semiconducting materials. computers come in three popular form factors: component, , and slate. many of today's digital devices operate on battery power supplied by ion batteries. battery life and lifespan can be extended by following good battery management practices.
Answers: 3
image
Computers and Technology, 22.06.2019 10:00, michael3592
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, leleee10
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
image
Computers and Technology, 23.06.2019 09:00, 19youngr
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
You know the right answer?
Design a class named Employee. The class should keep the following information in member variables:...

Questions in other subjects:

Konu
Mathematics, 02.04.2020 04:49