0% found this document useful (0 votes)
17 views1 page

Lab 533

Uploaded by

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

Lab 533

Uploaded by

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

Lab4

Develop OOP application: HR management with following components and requirements

1. Create MVC console application in NetBean:


a. Define class Staff with following attributes and methods:
+ StaffID, Full name, Date of birth, Phone.
+ Validate that staffID follows the format “S0000” – start with letter ‘S’ and 4
digit characters.
+ Validate that date of birth follows the format “dd/MM/yyyy” and require at
least 18 years old.
+ Method getAge() return age of staff based on year of birth
+ Method implements Comparable interface that compare on date of birth
Note: No IO console used in this model class
b. Define class StaffList to manage list of staffs with following methods:
+ Read String array Read data from string array, initialize objects in Staff List
staffArray={“ Phan Truong Minh:11/05/2002:0905189234”, “S0002:Tran Trung
Tien:31/08/2003:0913235467”, “ S0003:Minh Nguyen:20/09/2001:037896754”,
”S0004:Phan Thi Minh Thu:09/08/2002:090324565 ”}
+ Method that can search staff by any criteria
+ Method to add new staff to StaffList with no duplicate staffID!
+ Method sort by Name, Age and descending by Date of birth
+ Method statistic Staff have the same age
Note: No IO console used in this model class
c. Develop HumanResourceApp class to run the application
+ Main menu for application include: Display all staff, Add new staff, Search staff
by age, Quit
Hint: An abstract class Menu is provided for use in the application and sub menu
for function.
Note: This class allows interaction with user IO from console. Handle an
exception if the user enters incorrectly and requires re-entry.

2. Technical requirements:
+ Create package model for Staff and StaffList class.
+ Create package view for Menu and HumanResourceApp class.
+ Create package controller for HumanResourceApp class.
Notice: Student must strictly follow all requirements as describe above for marking,
Any modification the detail requirements is not allowed and will get no mark!

You might also like