1.Consider the UML class diagram shown below for circle and rectangle class derived from the
abstract Shape class. Implement the classes with variables and methods. Do not add or
remove anything from the design of the classes.
2. For this question, you are to use the modified FXGUITemplate code provided, and create a GUI
application that looks like the provided image using Button, Label, TextField, and Canvas objects.
PARTIALLY PROVIDED CLASS:
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class DrawCircle extends Application
{
// TODO:
// TODO:
// This is where you create your components
@Override
public void start(Stage stage) throws Exception
{
Pane root = new Pane();
Scene scene = new Scene(root); // set window size here
Canvas canvas = new Canvas(); // set canvas size here
stage.setTitle(); // set window title here
stage.setScene(scene);
// TODO:
stage.show();
}
public static void main(String[] args)
{
launch(args);
}
}
OBJECT DESCRIPTION:
The GUI application has the following features:
• The window is 400 by 400 and has a title of “Draw Circle”
• The background colour is “light blue”
• The circle’s colour is “green” with a “dark green” outline of width 5
• The circle is centred in the window
• The circle should be redrawn every time a new radius is entered and the button pressed
• Do not use a separate Circle model – just do everything in the one file
NOTE: This is a college-level project DO NOT use high-level programming use the basic which is required. Please DO NOT use any AI tool to write the code the code should be hand-written. Read and follow all the instructions properly and carefully. Please find attached a screenshot of the UML diagram and the preferred output.
Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount