This project was the result of a university assignment. The task was to develop a GUI interface in Java to manage the assembly of a hypothetical long-distance train. The programming for this project was divided into two parts : the logic and the GUI. Extensive testing was also required for each part of the project. The project was done in a group of two, with one person programming the functionality required and the other designing the tests.
For the first part, the functionality was programmed by my partner while I designed and programmed unit tests using the junit API in java. A total of 88 unit tests were programmed to completely test this part of the project. For the second part, I programmed the GUI with the swing API while my partner designed the tests.
This project achived 28 marks out of a possible 30.
Above is a screenshot of the graphical user interface at the start of the application. The user can add carriages, remove carriages, add passengers and depart. There are restrictions in place like passengers can't be boarded till there is a passenger carriage, the first carriage must be a locomotive, etc. that were specified in the original task.
This is the carriage selection dialog that opens up when the "Add Carriage" button is pressed. The user can select either a passenger carriage or a freight carriage. Note that the first carriage must be a locomotive and that the train can only have one locomotive.
This screenshot shows the application being used. The configuration of the train and passengers can be seen both in the GUI and in text.