-
Notifications
You must be signed in to change notification settings - Fork 1
Progress of project
19/05/2020
As for now, we have already assigned roles for each of us. We have analyse the requirements for this project and we did a flow chart to visualize the flow. Currently, the program has a Game class that contains a function to generate a list of random non-duplicate floats. A Driver class was also created to accept user inputs for the values n,m and t which includes exception handling for each value to accept only valid integers.
Photo generated from an extension in Visual Studio Code
9/06/2020
We created a Graph class that accepts coordinates as a parameter and plot the coordinates and the line between them. The graph was created using JFreeChart but encounter some problems and the GUI is not satisfactory. An alternative solution is still in the process of brainstorming. A timer class that uses TimerTask has been created to stop the program after a certain amount time has passed.
22/06/2020 We have implemented threads into the program using Runnable in the Thread class that is called in main of Driver class. The thread's run method consists of a getPoints method which assigns two points to the thread for the edge creation part which is still in progress.
26/06/2020 The program has completed its development. We are able to finish working on the project. Some changes have been made such as replacing the Runnable thread to Executor Service in order to implement the timer thread in the same pool. Recreating the graph class by implementing the existing JFreeChart line chart (DrawLines class) but manipulating it to do what is required. Multiple tests have been conducted and so far the program works even for larger inputs. We did face some issues but in the end we are able to find solution for it by helping each other on the code.
These are the classes that we have created
This how the user input works
This is the graph generated based on the user input and a result of the game.
Each colour represents a single thread.