Employee

I so stuck can someone help me

Write a complete class according to the following requirements.
--The class is called “Employee”.
--It has 4 private members: name (char type), age (integer type), salary(double type). It has two constructors: one has no arguments and it initializes name with 'W', age with 25, and salary with 200.00; the other takes two arguments (char char1, int var_age) and it initializes name with char1’s value, age with var_age’s value, and salary with 500.00. The class also has a member function access which outputs name’s value, age’s value, and salary’s value to screen.
The class has a friend function overloading operator == so that it will return true when comparing two objects of the same class employee. For example, if employee1 and empl2 are two objects of class Employee and their 3 private members are same, (empl1= =empl2) will return true.
--Write a main program to test your class implementation.

Last edited on
Try to code it on your own first. No one is going to up and write the code for you.
Topic archived. No new replies allowed.