School management CLI application
Syntax
TRAINEE ADD <firstName> <lastName>
Description
Creates a new trainee and assigns a unique ID - a random number between 0 and 99999.
Parameters
<firstName> Trainee’s first name (no spaces)<lastName> Trainee’s last name (no spaces)Output
CREATED: <ID> <firstName> <lastName>
Errors
ERROR: Must provide first and last nameSyntax
TRAINEE UPDATE <ID> <firstName> <lastName>
Description
Updates a trainee's first and last name.
Parameters
<ID> The ID of the trainee to update<firstName> Trainee’s first name (no spaces)<lastName> Trainee’s last name (no spaces)Output
UPDATED: <ID> <firstName> <lastName>
Errors
ERROR: Trainee with ID <ID> does not existERROR: Must provide ID, first name and last nameSyntax
TRAINEE DELETE <ID>
Description
Deletes a trainee.
Parameters
<ID> The ID of the trainee to deleteOutput
DELETED: <ID> <firstName> <lastName>
Errors
ERROR: Trainee with ID <ID> does not existSyntax
TRAINEE GET <ID>
Description
Shows information about a specific trainee.
Parameters
<ID> The ID of the trainee to displayOutput
<ID> <firstName> <lastName>
Courses: <Course1>, <Course2>, ...
Display all courses the trainee is participating in. If the trainee is not participating in any course, display: Courses: None
Errors
ERROR: Trainee with ID <ID> does not existSyntax
TRAINEE GETALL
Description
Displays all trainees sorted by last name, at the end display the total number of trainees.
Parameters
None
Output
Trainees:
<ID> <firstName> <lastName>
<ID> <firstName> <lastName>
<ID> <firstName> <lastName>
<ID> <firstName> <lastName>
<ID> <firstName> <lastName>
<ID> <firstName> <lastName>
Total: 6
Errors
None
Syntax
COURSE ADD <name> <startDate>
Description
Adds a new course with a name, start date and assigns a unique ID - a random number between 0 and 99999.
Parameters