A Java program is developed with a graphical user interface (GUI) to render 2D objects based on user input, visualise some transitions between states and demonstrate how you’ve preserved states between transitions. Java 11 and JavaFX are used to implement the logic and GUI components.
The program has the following functionality:
- [Component 1] An interactive component which has the following actions associated to it; the component can accept user input, where assuming the input is valid, a shape will be displayed on the main screen. It is assumed that the program will eventually support a large variety of shapes. The program should currently accept the following shapes as input: semi-circle, rectangle, pentagon.
1.1. You need to ensure that the user input is validated, and feedback is given when invalid input is entered.
1.2. The program should only allow the user to enter one valid shape at a time.
1.3. The main screen should only display one shape at a time.
- [Component 2] An interactive component which has the following actions associated to it; the component must accept user input, where assuming the input is valid, the currently displayed shape will be filled using the colour of the valid input. Again, it is assumed that the program will eventually support a large variety of colours. The program should currently accept the following colours as input: orange, blue, grey.
2.1. You need to ensure that the user input is validated, and feedback is given when invalid input is entered.
2.2. The program should only allow the user to enter one valid colour at a time.
2.3. The currently displayed shape should only be filled with one colour at a time.