Programming Lab2
Lab 2
Goal: The purpose of this lab is to demonstrate an understanding of constructors.
Problem: You are working in GMU’s HR department. HR is responsible for tracking employee data to include: name, idNumber, department, and if orientation was attended. Whenever a new employee is hired, not all data is always available. You figure out data is always available in one of the following combinations:
The ID number and name are known, but the department is not
The ID number is known, but the name and department are not
The ID number, name, and department are all known
If orientation was attended is never known.
The following employees currently exist:
ID: 5678. Name = Mary Contrary. The department is unknown
ID: 1234; Name = Stu Dyalot; Department = AIT
ID: 2468; Name = Julian Date. The department is unknown
Create an object-oriented solution to:
Simulate the creation of these three employees with a message noting all employees have been loaded
Creates a fourth employee from user input, entering only an ID number and name
Provides a menu of all four employees with the opportunity to mark employees as having attended orientation, until the user indicates they are finished.
o Note: Before marking an employee as having attended orientation, a check should occur to make sure the employee has not already attended orientation.
Note: Your program must use information hiding and your data definition class should not have any input or output statements in it.
12 years ago
Purchase the answer to view it
- gmu.java