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."
Here is my code I have two errors:Hopefully someone can run my code and help me out!
1. Severity Code Description Project File Line Suppression State
Error C2008 '.': unexpected in macro definition EmployeeProductionWorker f:\computer science 2\employeeproductionworker\productionworker.h 2
2. Severity Code Description Project File Line Suppression State
Error C2008 '.': unexpected in macro definition EmployeeProductionWorker f:\computer science 2\employeeproductionworker\employee.h 2
Hello guys I got the program to compile! I'm having trouble getting the shift, shirt number, pay rate to show up at. If someone can run my code and help me I would great help!
Since you wrote this code you will have a clear idea of how you have tested your program and details of what you attempted, what you expected as output and what you actually got as output, perhaps error messages, even line numbers.
Better still, go back to the step where you got to in writing your code and it was running properly and isolate what new change caused the problem. If you tell us that it would help a lot :)
I have everything working except the Shift Number and What Shift the person works on! I'm assuming the problem is with my ProductionWork. h because it keeps putting #3 for both the shift and shift number!
Here is the output I keep getting
Name: John Jones
Employee Number: 123
Hire Date: 1/1/2006
Shift: (depending on the #1 or #2 should be Day for #1 and Night for #2)
Shift Number: (this parts needs be either 1 or 2)
It keeps putting 3 because that’s what you specify when you declare pw in main(). There’s nothing in the constructor that will throw an exception for an invalid shift.
Can I please get someone to run my code and help me get this last two issues corrected please:
This is what I'm trying to accomplish! I have everything working correcting except the Shift and Shift Number: I have provided my code:
Here is the output I Need:
Name: John Jones
Employee Number: 123
Hire Date: 1/1/2006 Shift: (depending on the #1 or #2 should be Day for #1 and Night for #2)
Shift Number: (this parts needs be either 1 or 2)
Are you really, really sure this is your own work?
Because if you wrote this code and not copied it, you would know and understand exactly what I have been saying and know exactly where you wrote the relevant code. But regrettably you haven’t given any indication you know.
Maybe I’m wrong. Maybe you were in a trance when you wrote it. Maybe you simply forgot where you put it. Only you know for sure.
And maybe someone will come along and answer your question. Good luck to you, and them :)
Listen Kemort just because I can't read between whatever your hinting at doesn't mean I'm stupid. If you aren't willing to help or show me what I'm missing then stop posting on my post! I have it working only issues is I can't figure out two parts and I've been looking and changing things constantly only to be getting more lost. I'm just learning this kind of stuff so I'm no pro the way you seem to be with your post.
Take it easy, I understand. I would say cunning and deceptive rather than stupid. But rest assured, you’re beautiful when you’re angry. Like I said someone might come along so good luck and stand by.
And please, for next time, be more descriptive than saying "the problem doesn't work".
Is it compiling? If not, what's the error?
If it is running, is it crashing or just with unexpected output?