63 799
Assignments Done
99,4%
Successfully Done
In August 2018

Answer to Question #5723 in Java | JSP | JSF for asiya

Question #5723
Employee Information System

An organization maintains the following data about each employee.

Employee Class

Fields:

int Employee ID

String Name

Date dateOfBirth

Date dateOfJoining

Methods:

Date checkDate(String dt) - Validate date entered by the user

setDateOfBirth(Date dob) - set valid date of birth

setDateOfBirth(Date doj) - set valid date of joining

print() - prints (system.out.println) the details of the employee

Algotithm:

Prompt the user to enter dob and doj. Check if the date entered by the user is valid or not.

If invalid date is entered, then display an appropriate error message and ask the user to enter again.

If valid date is entered, then set the member variables of the employee object with the employee id (auto -increment, assigning 1 to first employee during every execution) and date details. Invoke function print() of the employee object to print employee details.

User may enter date in any of the following three formats:

10 November 1994
10/11/1994
10-NOV-1994
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions