Scenariodesign a class to represent employees in a small


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.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Scenariodesign a class to represent employees in a small
Reference No:- TGS01181906

Expected delivery within 24 Hours