creating a class named "Employee"
| 48 | |
| 49 | // creating a class named "Employee" |
| 50 | class Employee |
| 51 | { |
| 52 | private: |
| 53 | string Employee_ID; |
| 54 | string Employee_Name; |
| 55 | int Hours; |
| 56 | int Rate; |
| 57 | |
| 58 | public: |
| 59 | void setEmployee_ID(string x) |
| 60 | { |
| 61 | Employee_ID = x; |
| 62 | } |
| 63 | string getEmployee_ID() |
| 64 | { |
| 65 | return Employee_ID; |
| 66 | } |
| 67 | void setEmployee_Name(string y) |
| 68 | { |
| 69 | Employee_Name = y; |
| 70 | } |
| 71 | string getEmployee_Name() |
| 72 | { |
| 73 | return Employee_Name; |
| 74 | } |
| 75 | void setHours(int z) |
| 76 | { |
| 77 | Hours = z; |
| 78 | } |
| 79 | int getHours() |
| 80 | { |
| 81 | return Hours; |
| 82 | } |
| 83 | void setRate(int i) |
| 84 | { |
| 85 | Rate = i; |
| 86 | } |
| 87 | int getRate() |
| 88 | { |
| 89 | return Rate; |
| 90 | } |
| 91 | double total_salary() |
| 92 | { |
| 93 | int total; |
| 94 | total = Hours * Rate; |
| 95 | return total; |
| 96 | } |
| 97 | }; |
| 98 | |
| 99 | int main() |
| 100 | { |
nothing calls this directly
no outgoing calls
no test coverage detected