Create a class called Employee that includes four pieces of information as data members — a first name (type string), a middle name (type string) , a last name (type string)and a monthly salary (type int). Your class should have a constructor that initializes the four data members. Provide a set and a get function for each data member. If the monthly salary is not positive, set it to 0. Write a c++ test program that demonstrates class Employee’s capabilities. Create two Employee objects and display each object’s yearly salary.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here