0% found this document useful (0 votes)
26 views2 pages

Midterm Exam Cmu-Cs303

Uploaded by

khoa123kd56cn4
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)
26 views2 pages

Midterm Exam Cmu-Cs303

Uploaded by

khoa123kd56cn4
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/ 2

MIDTERM EXAMINATION No

ESSAY 1
Course: CMU- CS 303 Fundamentals of Computing 1
International School Semester:
SE-MIS Program Duration: 90 minutes
Date: ……./……/…….

Student Name:............................................................. Student ID:..........................

Score Examiner’s Signature Exam Monitor’s Signature

PART II: ESSAY

26. (4.000 Points)


Write an employee management program as shown in the figure:

26.1. (0.25 point) Define interface with methods: CalculateSalary() and


CalculateAllowance(); and with property: BASIC_SALARY
26.2. (0.5 point) Construct an abstract class EMPLOYEE implements interface
IEMPLOYEE. It contains:
- properties: EmpID, EmpName, EmpDateOfBirth, StartDate.
- Getter methods for: EmpID, EmpName, EmpDateOfBirth, StartDate.
Page 1 of 2
- Setter methods for: EmpID, EmpName, EmpDateOfBirth, StartDate.
- The methods: Input(), Output(), CalculateSeniority() that calculate the number of
working year.
CalculateSalary() method is calculated as:
+ For EMP_FULLTIMESalary = Basic salary * coefficientSalary + Allowance
+ For EMP_PARTTIMESalary = Basic salary * number of workdays / 26 +
Allowance
CalculateAllowance() method is calculated as:
+ For EMP_FULLTIME
If Seniority >=10 years, Allowance = 1000000;
If Seniority >=5 years, Allowance = 500000;
The rest is 0
+ For EMP_PARTTIME
If Seniority >=10 years, Allowance = 500000;
If Seniority >=5 years, Allowance = 300000;
The rest is 0
26.3. (1 points) Define a class EMP_FULLTIME extends EMPLOYEE contains:
- properties: coefficientSalary
- Getter methods for: coefficientSalary
- Setter methods for: coefficientSalary
- The methods: Input(), Output(), CalculateSalary(), CalculateAllowance()
26.4. (1 points) Define a class EMP_FULLTIME extends EMPLOYEE contains:
- properties: number of workdays
- Getter methods for: number of workdays
- Setter methods for: number of workdays
- The methods: Input(), Output(), CalculateSalary(), CalculateAllowance()
26.5. (1.25 points) Define a class named EMP_LIST as shown in the figure. It
contains:
- A variable: list (ArrayList) that contains list of employees.
And perform the functions as:
- AddNew,
- Update information of emplyee based on EmpID;
- Delete an employee based on EmpID;
- Find an employee based on EmpID;
- The menu of the program allows the user to select the functions
---000---

Page 2 of 2

You might also like