Question: 2. Suppose you're working on payroll system. Define a class Employee representing employees of a company. Employees have the following properties: first name, last name,

 2. Suppose you're working on payroll system. Define a class Employee

2. Suppose you're working on payroll system. Define a class Employee representing employees of a company. Employees have the following properties: first name, last name, id number, and salary. Your class should have instance variables of appropriate types with getters and setters for these properties. Your class should have two constructors: one takes all the properties, one takes only first and last names and sets the id number and salary to some reasonable default. . Your class should have a method raise that increments the employee's salary by the given amount (decrements if the amount is negative) . Your class should have an informative tostring method. Include a separate class that tests the use of your Employee class, including giving an employee a 10% raise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!