LO1 Identify and justify good practices in object-oriented software development. Communicate the aspects of object-oriented programming which are advantageous when compared to non-object-oriented paradigms;
LO2 Acquire detailed knowledge of concepts of object-oriented programming and apply characteristics, tools and environments to adapt to new computational environments and programming languages which are based on object-oriented principles;
LO3 Design and implement applications based on an object-oriented programming language, given a set of functional requirements. Use APIs which have not been exposed to previously, in order to develop an application requiring specialised functionality;
LO4 Design and Implement graphical interfaces using an object-oriented programming language;
LO5 Apply appropriate techniques for evaluation and testing and adapt the performance accordingly.
Your task is to create a Java program which simulates the manipulation of a Formula 1 racing car championship.
For the GUI part you are NOT allowed to use drag and drop tools (such as those found in Netbeans, etc.) to create the graphical user interface for any part of this coursework! All graphical code should be manually written in Java Swing and no tool which generates code automatically should be used. Any submission which uses for any part of this assignment drag and drop tools will not receive any marks for these parts.
Implement a class Formula ChampionshipManager which extends interfaceChampionshipManager. The Formula1ChampionshipManager class maintains a number of drivers and cars (constructors, i.e. manufacturer of the car) which compete in the Formula 1 car championship. Each driver belongs to exactly one constructor team (e.g. Ferrari) and each constructor team has a single driver (e.g. Mercedes has a single driver called Hamilton) The details for the implementation of the system are given in the steps below: It is important to follow exactly the specifcations and your implementation must conform to these:
Design and implement classes Driver (abstract class), Formula1Driver. The classes should include appropriate methods and hold information about the name of the driver, their location, the team they belong to and various statistics about the drivers. Formula1Driver should include statistics such as how many frst position, second positions and third positions an instance of it has achieved in the season. The number of points that a driver currently has, and the number of races participated so far in the season should also be included.
The points awarded for each driver in a race (and for the all the calculations in this assignment) are according to the following scheme:
The driver who got the first position in the race wins 25 points, the second 18, the third 15 and so on. A driver must finish the race to be awarded points and also finish it in the first 10 positions. (5 marks).
Implement a class Formula1ChampionshipManager which extends interface ChampionshipManager. The Formula1ChampionshipManager class maintains a number of drivers who play in the Formula 1 championship. (5 marks). The class should create a menu based on text input (i.e. console and NOT graphical components) and give the user the choice of:
Add a race completed with its date and the positions that all the drivers achieved. The statistics of all the drivers who participated and the Formula 1 championship table are updated automatically. (7 marks).
Saving in a file of all the information entered by the user so far. (8 marks).
The next time the application starts it should read all the information saved in the previous file (resume/recover the previous state of the program) and continue its operation based on that with the user being able to enter new information or change the existing information. (9 marks).
Start a graphical user interface (GUI) based on Java Swing from the text menu (i.e. console)which is able to do the following:
A button which is similar in functionalit with the previous questions (i.e. I generates the results of a full race and adds them in the statistics) with the following modification. The drivers are starting the race in a randomly calculated position (e.g. Vettel in starting position 1, Hamilton in starting position 2 and so on). These starting positions should be random and not hardcoded. The results of the race are probabilistic and according to the starting position, more specifically: the driver starting in position 1, has 40% probability to win the race, the driver starting in position 2 has 30% probability to win the race, the drivers starting inpositions 3 and 4 have a 10% each to win the race. All of the drivers in positions 5 to 9 each have a probability of 2% to win the race and all other drivers have a 0% chance to win the race. The rest of the positions (2–10) are determined completely randomly marks (8).
Add a button which displays all the completed races sorted in ascending order of date played (both randomly generated or manually entered using the text menu functionality described above). This should display all the races that took place in the season, included races inserted and generated in previous runs of the application (assuming that the user saved the information entered using the text menu functionality above). (7 marks).
Add a button and a textbox which can be used to search for all races that a given driver participated. The full details of the races should be displayed (i.e. both the dates and the positions of the driver in the matching races). (5 marks).