so I'm doing a hr system to learn some new coding and I'm having trouble understanding these four points if anyone can help.
It's not a code, but I'll treat it as one for the sake of clarity!
If anyone could assist with a diagram or anything else useful, that would be fantastic; I tried to understand it and draw a diagram for it but couldn't. This is all GUI! Thank you for reading.
What I have tried:
<pre lang="Java">
Details for the functions in the menu:
Add a new employee: Read the employee’s (id) from the user, and validate that it does not already exist in the array otherwise display an appropriate message and go back to the menu. After validating the id, read from the user: the job title. Assign the value “N/A” to contractDate, startTime, and endTime. Then, assign value false to hired attribute, and the value 0 to the hiring frequency.
Start a hiring contract: (used when a customer requests an employee) Read the employee’s (id) from the user. Make sure the employee exists and is not yet hired, then read the contract’s information: contractDate, startTime, and endTime. Also, set the hired value to true, and the hiring frequency will be incremented by
The program should then display the employee’s information and state that he/she is now ready for starting the assigned job. In case if the employee is not existed or he/she is already hired, then display appropriate messages and go back to the menu. Note: Assume that the user will enter the contract’s information correctly, i.e. the date is today or in the future, and the start time is before the end time.
End a hiring contract: (used when the employee is done and checks back into the company) Read the employee’s (id) from the user. Make sure the employee exists and is hired, then display the employee’s information and contract’s total duration. To end this hiring contract, reset the employee’s values so that he/she can be hired again: assign the value “N/A” to contractDate, startTime, and endTime. Then, assign the hired attribute’s value back to false. In case if the employee is not existed or he/she is not hired, then display appropriate messages and go back to the menu.
Display an employee’s info: Read the employee’s (id) from the user. If the employee is not existed, then display an appropriate message and go back to the menu. Otherwise, display the employee’s information.