Thread: code Help* Please

  1. #1
    Registered User
    Join Date
    Dec 2007

    Question code Help* Please

    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.
    //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
    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;
    string name; 
    string ssn; 
    double netPay;
    #endif //EMPLOYEE_H
    //This is the header file hourlyemployee.h. 
    //This is the interface for the class HourlyEmployee.
    #include <string>
    #include "employee.h"
    using std::string;
    namespace SavitchEmployees
    class HourlyEmployee : public Employee 
    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( ) ; 
    double wageRate; 
    double hours;
    #endif //HOURLYMPLOYEE_H
    //This is the header file salariedemployee.h. 
    //This is the interface for the class SalariedEmployee.
    #include <string>
    #include "employee.h"
    using std::string;
    namespace SavitchEmployees
    class SalariedEmployee : public Employee
    SalariedEmployee( );
    SalariedEmployee (string theName, string theSsn,
    double theWeeklySalary);
    double getSalary( ) const;
    void setSalary(double newSalary); 
    void printCheck( ); 
    double salary;//weekly

  2. #2
    Join Date
    Oct 2007
    Inside my computer
    We won't do your homework. If you have problems, then ask questions.
    And indent your code!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM