0% found this document useful (0 votes)
93 views

Assignment PRO192

pro

Uploaded by

shophiepga9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

Assignment PRO192

pro

Uploaded by

shophiepga9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Title

Employee management in a computer company


Background
A software company needs to manage employees in the company. In this
exercise, students will have to implement some components in the employee
management system. The main objects to be managed are Developers,
TeamLeader and Testers. Let's build your idea based OOP model.
Program Specifications
Build a Employee management program. With the following basic
functions
0. Build your data structure
1. Show the Employee list
2. Add Employee
3. Update Employee
4. Search Employee
4.1. By name
4.2. By salary higher value
4.3. By programming languages
5. Store data to file
6. Sort Employee
7. Exit
Each menu choice should invoke an appropriate function to perform the
selected menu item.
Your program must display the menu after each task and wait for the user
to select another option until the user chooses to quit the program.
Each Tester has the properties such that employee code, employee name,
base salary of the employee, rate of additional income, type of tester
(Automation Test - AM/Manual Test - MT).
Each Developer has the properties such that employee code, employee
name, base salary of the employee, a list of programming languages, the team
name of the programmer and the number of years of experience of the
programmer. Each programmer belongs to only one group.
Each TeamLeader has the properties such that employee code, employee
name, base salary of the employee, a list of programming languages, the team
name of the programmer, the number of years of experience of the programmer,
and rate of additional income. TeamLeader is also a Developer, each team has
only 01 TeamLeader.

I. Description
- Developer and Tester inherit from Employee class and TeamLeader
inherit from Developer class.
- Explain some properties and methods as follows:
1.1. Employee class
- empID: employee code.
- empName: employee name.
- baseSal: base salary of the employee.
- The abstract method getSalary().
- toString(): returns the string in the format:
empID_empName_baseSal

1.2. Developer Class


- teamName: the team name of the programmer. Each programmer
belongs to only one group.
- programmingLanguages: a list of programming languages that
programmers are proficient in.
- expYear: the number of years of experience of the programmer.
- getSalary(): returns salary, as described below.
- toString(): returns the string in the format:
+ empID_empName_baseSal_teamName_expYear
1.3. Tester class
- bonusRate: rate of additional income.
- type: type of tester (Automation Test - AM/Manual Test - MT).
- getSalary(): returns salary, as described below.

TeamLeader class: TeamLeader is also a programmer, each team has


only 01 TeamLeader.
- bonus_rate: rate of additional income.
- getSalary(): returns salary, as described below.

1.4. Description of getSalary() method:


- Developer
+ If number of years of experience >= 5:
Salary = basic salary + years of experience * 1,000,000 (1 million).
+ 5 > Years of experience >= 3
Salary = base salary + years of experience * 500,000 (0.5 million).
+ The remaining case:
Salary = base salary.
- TeamLeader
If Developer is TeamLeader, there will be additional income.
Salary = developer salary + bonusRate * developer salary
- Tester
Salary = base salary + bonusRate * base salary

II. Features:
Display a menu and ask users to select an option.
– Function 0: Build the data structure
 Classes, abstract classes, and Interfaces are required.
 Employee code cannot change after created.
 You must implement the polymorphism properties of object-oriented
programming.
– Function 1: Show the Employee list
This function allows to show all data from file into the screen.
– Function 2: Add Employee
 Creates a submenu that allows the user add new Employee.
 Data constraints must be checked such as
 Employee code value can not duplicate
 Each team has only 01 TeamLeader.
 This function will add the new Employee to collection.
 The program provides options to ask to continuous create new animal
or go back to the main menu.
– Function 3: Update Employee
 This function allows to update Employee information base on
Employee code
 The user enters the Employee code
 If no Employee exists, the notification “Employee does not
exist”.
 Otherwise, user can start input new information of Employee
and update.
 Employee information that is updated must be validated.
 Process of this function should be shown success or fail status.
 The program should be allowed user selecting option to returning to
the menu.
– Function 4: Search Employee
 The user enters search text or value of salary.
 This function allows to user search Employee:
 All Employee information that has name contain the search text
or salary height value or Developer is proficient in
programming language will be shown.
 If no Employee is existed, the screen shows message “No
Employee is matched”.
– Function 5: Store data to file
 This function allows user store data in collection to file.
 The file data is read when the program started.
– Function 6: Sort Employee
 Sorted in ascending order by salary and name

You might also like