Question: 2. Write a general program that creates a class called Worker that has 3 pieces of information as data members. These data members are
2. Write a general program that creates a class called Worker that has 3 pieces of information as data members. These data members are a name, a surname, and a monthly salary. Include a constructor to initialize the 3 data members. You are expected to have get and set functions for every data member. Negative valued monthly salary should be set to zero. To test the software, write a test program that shows all the capabilities of employee class. Create 2 Worker objects and show each object's yearly earning. Then give every Worker a %10 raise and show each Workers yearly earning again.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
