For this assignment, you are required to develop a Windowed GUI Java Program to demonstrate you can use Java constructs including input/output via a GUI interface, Java primitive and built-in types, Java defined objects, arrays, selection and looping statements and various other Java commands. Your program must produce the correct results. The code for the GUI interface is supplied and is available on the unit website, you must write the underlying code to implement the program. The command buttons are linked to appropriate methods in the given code. Please spend a bit of time looking at the given code to familiarise yourself with it and where you have to complete the code. You will need to write comments in the supplied code as well as your own additions. What to submit for this assignment The Java source code: You will need to submit two source files:
CarPark.java and CarParkGUI.java, please submit these files as a single zip file, do not include your report in the zip file you must submit it as a separate file. o Ass2.zip If you submit the source code with an incorrect name you will lose marks. A report including an UML diagram of your CarPark class (see text p 493), how long it took to create the whole program, any problems encountered and screen shots of the output produced. (Use Alt-PrtScrn to capture just the application window and you can paste it into your Word document) You should test every possibility in the program.
o ReportAss2.docx You will submit your files by the due date using the “Assignment 2” link on the Moodle unit website under Assessment … Assignment 2 Submission. COIT11222, Assignment Two, 2018 Term One - Page 2 of 10 Assignment Specification In assignment one we read in multiple customer names, number plates and hours using both Scanner and GUI dialogs. In this assignment we are going to read in the data and output information via a GUI interface, the code for the GUI interface CarParkGUI.java is supplied (via the Moodle web site) which supplies the basic functionality of the interface. We are also going to store the information in an array of CarPark objects.
First step is to create a class called CarPark (CarPark.java) which will not contain a main. The CarPark class will be very simple which will contain three private instance variables: o customerName as a String o numberPlate as a String o hours as an integer The following public methods will have to be implemented: o A default constructor o A parameterised constructor o Three set methods (mutators) o Three get methods (accessors) o calculateParkingFee value returning method* *You will create a public value returning method calculateParkingFee(), the parking fee can be derived from the instance variable hours. Typically we do not store calculated values in a database so the fee will be derived via your calculateParkingFee () method. Do not store the fee as an instance variable. CarParkGUI class Once the CarPark class is implemented and fully tested we can now start to implement the functionality of the GUI interface.
Data structures For this assignment we are going to store the customer names, number plates and hours in an array of CarPark objects. Do not use the ArrayList data structure. Declare an array of CarPark objects as an instance variable of CarParkGUI class, the array should hold ten* entries. Use a constant for the maximum entries allowed. *Ten cars are unrealistic for a carpark but we will use this value during development of this program. private CarPark  carParkArray = new CarPark[MAX_CARS]; We need another instance variable (integer) to keep track of the number of customers being entered and use this for the index into the array of CarPark objects.