#ifndef Employee_h#define Employee_h
#include
class Employee{ public: Employee (void); Employee(char*nam,float ag, int id, float p); char *getname(void); virtual void cal_pay() = 0; virtual void display() = 0; protected: char name[21]; float age,pay; int EID;};
#endif
class Direct : public Employee{ friend istream &operator>>( ostream &, const Circle & ); friend ostream &operator<<( ostream &, const Circle & ); friend ostream &operator<<( ostream &, const Circle & );
public: Direct( void); Direct( char *nam, float ag, int id, float bas, float r ); void cal_pay() { pay = basic * (1 -cpf_rate/100) return pay }; void display(); protected: float basic, cpf_rate;};
0 Comments:
Post a Comment
<< Home