Reference no: EM13888656
Scenario:
Design a class to represent Employees in a small company according to the following requirements:
1- An employee has three attributes: name , salary and jobTitle
2- Add one constructor without parameters. In initialization of objects, Name is set to the value "NEW" and salary value is unspecified but it has to be an arbitrary number between 100 and 20000.
3- Add the following methods to the class:
? getSalary- Returns employee's salary.
? getName- Returns employee's name.
? getJobTitle- Returns employee's job title.
? setName- Sets the employee's name to a given value. Precondition: the number of characters in the given name is not less than 3 characters.
? setSalary - Sets the employee's salary to a given value. Precondition: the given salary value should be greater than 100.
4- All employees in this company have the same permanent job title: "Accountant" and it can't be changed.