
Create a class called Employee that includes three pieces of information as instance variablesââ?¬â??a first name (type string), a last name (type string) and a monthly salary (decimal). Your class should have a constructor that initializes the three values. Provide a property with a get and set accessor for any instance variables. If the monthly salary is negative, the set accessor should leave the instance variable unchanged. Write a test application named EmployeeTest that demonstrates class Employeeââ?¬â?¢s capabilities. Create two Employee objects and display each objectââ?¬â?¢s yearly salary. Then give each Employee a 10% raise and display each Employeeââ?¬â?¢s yearly salary again.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.