The application
You shall create an application that is a time report system. With help of the application it shall be possible for a person to register different jobs, and the worked time for those jobs.
Your solution shall consist of at least two classes, a class Job, which shall represent a work that is done and a class that represent the applications graphical user interface, “gui”. The gui shall at least consist of one graphical window, the MainWindow.
The gui must be easy to use for a person that is not familiar with the application.
The main window shall have a jComboBox that makes it possible for the user of the application to select different jobs by their names.
The content of a selected job shall be displayed with help of different graphical components. The name of the work shall be displayed by the combo box. All other information about the selected job shall be displayed with help of separate text fields and/or labels.
Programming task 1, 3p
Design and implement the class, Job. The class shall have the following instance fields:
A string that represent the name of the Job.
A string that represent a note of what the job consist of.
Three integers that represent the date when the work is done, one integer for the year, one for the month, and one for the day of the month.
A boolean that indicate if work of the job have begun or not
It shall be impossible to change the name of a job that is represented of an object of the class Job after that the object is created. A job object shall only allow changes of its date as long the work has not begun.
Later on you probably have to add more fields to the class Job.
Programming task 2
Add to the main window a panel with a border. The panel shall have graphical components that make it possible for a user of the application to add new jobs to the application. It’s up to you if you let the application-user enter all the information about the work or only the name of the work before the work is added to the application. The note and date of a work shall be possible to update after the work is added to the application, se task 4.
Programming task 3
The main window shall have a panel with a border that represents selection of a job. It shall be possible for the user of the application to select a job by its name with help of the combo box. The selected work’s note and date shall be displayed with help of separate text fields.
Programming task 4
Make it possible to update the values of a selected job. All the values of the job, except for its name, shall be possible to update. The date of the job shall only be possible to update under certain conditions, see programing task 1.
Programming task 5
It shall be possible to remove a selected job from the application.
Programming task 6
Modify the class Job so it only allows correct dates and adjust the rest of the application according to this.