| | |
code Help* Please
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2007
Posts: 3
Reputation:
Solved Threads: 0
Hello~I am having trouble with my homework.
I could not have them done. Please Please help me with it.
Thank you all. God bless...
The question is
""Add temporary, administrative, permanent, and other classifications of employees to the hierarchy from the three coding. Implement and test this hierarchy. Test all member functions. A user interface with a menu would be a nice touch for your test program.""
Here are 3 coding.
I could not have them done. Please Please help me with it.
Thank you all. God bless...
The question is
""Add temporary, administrative, permanent, and other classifications of employees to the hierarchy from the three coding. Implement and test this hierarchy. Test all member functions. A user interface with a menu would be a nice touch for your test program.""
Here are 3 coding.
C++ Syntax (Toggle Plain Text)
"-----------First //This is the header file employee.h. //This is the interface for the class Employee. //This is primarily intended to be used as a base class to derive //classes for different kinds of employees. #ifndef EMPLOYEE_H #define EMPLOYEE_H #include <string> using std::string; namespace SavitchEmployees { class Employee { public: Employee( ); Employee(string theName, string theSsn); string getName( ) const; string getSsn( ) const; double getNetPay( ) const; void setName(string newName); void setSsn(string newSsn); void setNetPay(double newNetPay); void printCheck( ) const; private: string name; string ssn; double netPay; }; }//SavitchEmployees #endif //EMPLOYEE_H -----------" "------Second //This is the header file hourlyemployee.h. //This is the interface for the class HourlyEmployee. #ifndef HOURLYEMPLOYEE_H #define HOURLYEMPLOYEE_H #include <string> #include "employee.h" using std::string; namespace SavitchEmployees { class HourlyEmployee : public Employee { public: HourlyEmployee( ); HourlyEmployee(string theName, string theSsn, double theWageRate, double theHours); void setRate(double newWageRate); double getRate( ) const; void setHours(double hoursWorked); double getHours( ) const; void printCheck( ) ; private: double wageRate; double hours; }; }//SavitchEmployees #endif //HOURLYMPLOYEE_H -----------" "---------Third //This is the header file salariedemployee.h. //This is the interface for the class SalariedEmployee. #ifndef SALARIEDEMPLOYEE_H #define SALARIEDEMPLOYEE_H #include <string> #include "employee.h" using std::string; namespace SavitchEmployees { class SalariedEmployee : public Employee { public: SalariedEmployee( ); SalariedEmployee (string theName, string theSsn, double theWeeklySalary); double getSalary( ) const; void setSalary(double newSalary); void printCheck( ); private: double salary;//weekly }; }//SavitchEmployees #endif //SALARIEDEMPLOYEE_H ------"
At least one
Everyone's gotta believe in something. I believe I'll have another drink.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
>>I could not have them done
Does that mean no one else will do your homework so now you are begging us to do it ? I don't think you will find anyone here willing to do your homework either.
Hint: I think what your assignment is asking you to do is derive more classes from those aready derived, such as derive tempSalaried from SalariedEmployee and tempHourly from HourlyEmployee. But then I could be completly wrong too.
Does that mean no one else will do your homework so now you are begging us to do it ? I don't think you will find anyone here willing to do your homework either.
Hint: I think what your assignment is asking you to do is derive more classes from those aready derived, such as derive tempSalaried from SalariedEmployee and tempHourly from HourlyEmployee. But then I could be completly wrong too.
Last edited by Ancient Dragon; Dec 7th, 2007 at 12:25 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
c++ Syntax (Toggle Plain Text)
int main(int argc, char **argv[]) { //now instantiate each classes // and invoke the member functions one by one return 0; }
Last edited by ithelp; Dec 7th, 2007 at 7:51 am.
![]() |
Similar Threads
- Code 19 Registry Error (Windows NT / 2000 / XP)
- Why won't this code work? (VB.NET)
- Need help with DirectX code (C)
- Tutorials & Code Submissions - Questions? (DaniWeb Community Feedback)
- Some Basic Code Hopefully (Help Needed) (HTML and CSS)
Other Threads in the C++ Forum
- Previous Thread: Help! Name outfile by variable
- Next Thread: search word in file
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings struct temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






