Question: Provided Java Files Assignment6.java import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.layout.StackPane; import java.util.ArrayList; public class Assignment6 extends Application { private









![void main(String[] args) { launch(args); } } CreatePane.java import java.util.ArrayList; import javafx.scene.layout.HBox;](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66d983f81fd89_12766d983f7b10af.jpg)


Provided Java Files
Assignment6.java
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.layout.StackPane;
import java.util.ArrayList;
public class Assignment6 extends Application
{
private TabPane tabPane;
private CreatePane createPane;
private SelectPane selectPane;
private ArrayList clubList;
public void start(Stage stage)
{
StackPane root = new StackPane();
//clubList to be used in both createPane & selectPane
clubList = new ArrayList();
selectPane = new SelectPane(clubList);
createPane = new CreatePane(clubList, selectPane);
tabPane = new TabPane();
Tab tab1 = new Tab();
tab1.setText("Club Creation");
tab1.setContent(createPane);
Tab tab2 = new Tab();
tab2.setText("Club Selection");
tab2.setContent(selectPane);
tabPane.getSelectionModel().select(0);
tabPane.getTabs().addAll(tab1, tab2);
root.getChildren().add(tabPane);
Scene scene = new Scene(root, 900, 400);
stage.setTitle("Club Selection Apps");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args)
{
launch(args);
}
}
CreatePane.java
import java.util.ArrayList;
import javafx.scene.layout.HBox;
import javafx.event.ActionEvent; //**Need to import
import javafx.event.EventHandler; //**Need to import
//import all other necessary javafx classes here
//----
public class CreatePane extends HBox
{
ArrayList clubList;
//The relationship between CreatePane and SelectPane is Aggregation
private SelectPane selectPane;
//constructor
public CreatePane(ArrayList list, SelectPane sePane)
{
this.clubList = list;
this.selectPane = sePane;
//initialize each instance variable (textfields, labels, textarea, button, etc.)
//and set up the layout
//----
//create a GridPane hold those labels & text fields.
//you can choose to use .setPadding() or setHgap(), setVgap()
//to control the spacing and gap, etc.
//----
//You might need to create a sub pane to hold the button
//----
//Set up the layout for the left half of the CreatePane.
//----
//the right half of the CreatePane is simply a TextArea object
//Note: a ScrollPane will be added to it automatically when there are no
//enough space
//Add the left half and right half to the CreatePane
//Note: CreatePane extends from HBox
//----
//register/link source object with event handler
//----
} //end of constructor
//Create a ButtonHandler class
//ButtonHandler listens to see if the button "Create" is pushed or not,
//When the event occurs, it get a club's Title, its number of members, and its university
//information from the relevant text fields, then create a new club and add it inside
//the clubList. Meanwhile it will display the club's information inside the text area.
//using the toString method of the Club class.
//It also does error checking in case any of the textfields are empty,
//or a non-numeric value was entered for its number of members
private class ButtonHandler implements EventHandler
{
//Override the abstact method handle()
public void handle(ActionEvent event)
{
//declare any necessary local variables here
//---
//when a text field is empty and the button is pushed
//if ( //---- )
//{
//handle the case here
//}
//else //for all other cases
//{
//when a non-numeric value was entered for its number of members
//and the button is pushed
//you will need to use try & catch block to catch
//the NumberFormatException
//----
//When a club of an existing club name in the list
//was attempted to be added, do not add it to the list
//and display a message "Club not added - duplicate"
//at the end, don't forget to update the new arrayList
//information on the SelectPanel
//----
//}
} //end of handle() method
} //end of ButtonHandler class
}
SelectPane.java
import javafx.scene.control.Label;
import javafx.scene.control.CheckBox;
import javafx.scene.layout.*;
import javafx.event.ActionEvent; //**Need to import
import javafx.event.EventHandler; //**Need to import
import java.util.ArrayList;
import javafx.collections.ObservableList;
import javafx.scene.Node;
//import all other necessary javafx classes here
//----
public class SelectPane extends BorderPane
{
private ArrayList clubList;
//constructor
public SelectPane(ArrayList list)
{
//initialize instance variables
this.clubList = list;
//set up the layout
//----
//create an empty pane where you can add check boxes later
//----
//SelectPane is a BorderPane - add the components here
//----
} //end of constructor
//This method uses the newly added parameter Club object
//to create a CheckBox and add it to a pane created in the constructor
//Such check box needs to be linked to its handler class
public void updateClubList(Club newClub)
{
//-------
}
//create a SelectionHandler class
private class SelectionHandler implements EventHandler
{
//Override the abstact method handle()
public void handle(ActionEvent event)
{
//When any radio button is selected or unselected
//the total number of members of selected clubs should be updated
//and displayed using a label.
}
} //end of SelectHandler class
} //end of SelectPane class
Club.java
public class Club {
private String clubName;
private int numberOfMembers;
private String university;
//Constructor to initialize all member variables
public Club()
{
clubName = "?";
university = "?";
numberOfMembers = 0;
}
//Accessor method for club name
public String getClubName()
{
return clubName;
}
//Accessor method for university
public String getUniversity()
{
return university;
}
//Accessor method for number of members
public int getNumberOfMembers()
{
return numberOfMembers;
}
//mutator/modifider method for club name
public void setClubName(String someClubName)
{
clubName = someClubName;
}
//mutator/modifider method for university
public void setUniversity(String someUniversity)
{
university = someUniversity;
}
//mutator/modifider method for number of members
public void setNumberOfMembers(int someNumber)
{
numberOfMembers = someNumber;
}
//toString() method returns a string containg its name, number of members, and university
public String toString()
{
String result = " Club Name:\t\t" + clubName
+ " Number Of Members:\t" + numberOfMembers
+ " University:\t\t" + university
+ " ";
return result;
}
}
PhotoCopy Of Each Provided File







Added both photo copy and text copy of each provided file
Minimal Submitted Files You are required, but not limited, to turn in the following source file: Assignment.java (Download this file and use it as your driver program for this assignment.) CreatePane.java a (Download this file. You need to add more code to complete it.) SelectPane.java (Download this file. You need to add more code to complete it.) Club.java a (Download this file) Requirements to get full credits in Documentation The assignment number, your name, StudentID, Lecture day/time, and a class description need to be included at the top of each file/class. A description of each method is also needed. Some additional comments inside of methods (especially for a "main" method) to explain code that are hard to follow should be written. New Skills to be applied In addition to what has been covered in previous assignments, the use of the following items, discussed in class, will probably be needed: JavaFX, ArrayList Classes may be needed: Button, TextField, TextArea, Label, CheckButton, and ActionHandler. You may use other classes. Program Description Class Diagram: Application defined in javafx application Club CreatePane -clubList:ArrayList -selectPane.SelectPane Assignment +CreatePane(ArrayList SelectPane) -tabPane TabPane -createPane.CreatePane -selectPane:SelectPane -chubList.ArrayList SelectPane -chubList:ArrayList -start(Stage) void +SelectPane(ArrayList) +updateClubList(Club) SelectionHandler ButtonHandler thandle(ActionEvent) void +handle(ActionEvent):void Write a Java program that generates GUI (Graphical User Interface). Your program should provide labels and textfields to a user to enter information regarding clubs. The GUI of your program should contain two tabs. The first tab is labeled "Club creation" and the second tab is labeled 'Club Selection". The size of the applet here is approximately 900 X 400). The section under the first tab should be divided into two parts: The left part contains labels, textfields, and a button for a user to enter a club information. The right part shows "No Club' at the beginning (it is done using TextArea). Club Selection Apps Club Creation Club Selection No Club Number of Members University Create a Club A user can enter the information of a club, and push "Create a Club" button. Club Selection App Club Creation Club Selection No Club The Hiking Club Number of Members 42 University ASU Create a Club Club Selection Appa Club Creation Club Selection Club added Club Name: Number Of M University Hiking Club 12 Te Number of Members University CAR Club Then the club information should appear on the right hand side panel (note that the format of the club information can use toString() method of the Club class). A message "Club added" should also appear with red color at the top of the panel. Error handling: 1. If a user forgets to enter some field and pushes 'Create a Club" button, show a message "Please fill all fields" with red color, and nothing should be added to the right hand side panel. Cub Selection Appa Club Selection Club Creation Paola fields Swimming Club Number of Members 35 Club Name: Hiking Club Number Of Members 42 University ASU University Create a Club 2. If a user enters non integer in the field for the number of member, and pushes "Create a club" button, show a message "Please enter an integer for a number of members." with red color and nothing should be added to the right hand side panel. Cub Selection Apps Club Creation Cub Selection e ter an integer for number of members P Club Name Hiking Club Number Of Momberg. 42 University ASU Title Swimming Club Number of Members thirty Lininity Create a Club After entering multiple clubs, the GUI will have the following appearance. Club Selection Apps Club Selection Club Creation Club added Club Name: Hiking Club Number or Members: 42 University ASU Number of Members Universty Club Name: Robotics Club Number or Member: 28 University UoA Create a Club Club Name: Gaming Club Number or Member: 57 Univery: NAU Under the "Club Selection tab, a user can select from those created clubs. The list of created clubs should be made using a pane containing multiple check boxes. Above the pane containing check boxes, there should be a label to display "Select some clubs". Below the pane with check boxes, there should be a label to display "The total number of members for the selected club(s): 0". However this label should change to show a different number of members every time a check box is checked or unchecked. The list of clubs under the Club Selection tab should be exactly same as the list under "Club Creation" tab. Club Selection Appa Club Creation Club Selection Select some club Club Name: Mixing Club Number or Members: 22 University ABU Club Name: Robotics Club Number or Members: 28 Univerly UA Club Name Gaming Club Number or Members: 57 University NAU The total number of members for the selected clubs: 0 A user can check some check boxes. Every time one of the check boxes in the pane is checked or unchecked, then your program should compute the total number of members of the selected (checked) clubs and it needs to be updated in the label being displayed below. Club Selection Apps Club Creation Club Selection Select some clubs cub Name Hiking Club Number Of Members 42 University ASU Club Name Robotics Club Number Of Mombers 28 University of Club Name Gaming Club Number Of Members 57 University NAU The total number of members for the selected club 99 Club Selection Apps Club Creation Club Selection X Sinct some clubs Club Name: Number Of M Unity Hiking Club ars 42 Club Rob TK 28 Cuts Number of M C Garning Club onk S7 Number Of M Liity The total number of members for the selected clubs 28 A user should be able to go back and forth between "Club Creation" tab and "Club Selection" tab, and these two panels need to have a same list of Class description Select Pane SelectPane class should contain at least the following instance variable: Attribute name Attribute type Description club List ArrayList a list of club objects public SelectPane(ArrayList clubList) where the parameter 'clubList" is passed from the Assignment6 class. The constructor layouts and organizes nodes/components in this panel. You will be adding more variables (nodes/components) than what is listed here, including check boxes, and labels. An object of some pane (maybe VBox) needs to be created, where check boxes will be added later on, and it needs to be added to this SelectPane. public void updateClubList(Club newClub) This method creates an object of CheckBox using the toString method of the parameter object "newClub". Then the check box should be added to the pane that was initially added to the SelectPane in the constructor. This class contains a nested class called SelectionHandler class that implements EventHandler interface. Thus you need to define its handle method that is supposed to check which check boxes are checked, and compute and update the total number of members of selected clubs whenever one check box is checked or unchecked. CreatePane CreatePane should contain at least the following instance variable: Attribute name Attribute type Description ArrayList a list of Club objects. selectPane SelectPane an object of SelectPane. public CreatePane(ArrayList clubList, SelectPane selectPane) where the parameter 'clubList' is passed from the Assignment class and the second parameter is an object of SelectPane. The constructor layouts and organizes components in this panel. You will be adding more variables (nodes/components) than what is listed here, including labels, textfields, a button, and a text area. This class contains a nested class called ButtonHandler class that implements EventHandler interface. Thus the ButtonHandler needs to have a definition for handle method that adds some information of a club to the list and does error handling. See the UML class diagram for the parameter and return type of this method. In the handle method, you need to extract the information from the textfields. Then you can instantiate an object of the Club class and set its variable values using these values from the textfields. You can use the toString() method of the Club object to display the information on the textarea on the right hand side and also add the Club object to the clubList". Assignment class Assignment extends Application defined in javafx application package and should initialize itself by setting its size. It contains at least following instance variables: Attribute name Attribute type Description clubList ArrayList a list of club objects. It will be used in both CreatePane and SelectPane. selectPane SelectPane an object of SelectPane. createPane CreatePane an object of CreatePane. tabPane TabPane an object of TabPane. It will contain createPane and selectPane under each tab. Grading Policy: submit assignment on time indicate assignment number, name, lecture time, and description of each class clearly in each submitted java file 5 pts - Documentation (header with your name, your information, and program description for every class/lile and comment/description within your code for every method) 1 pt - Indentation and spacing (easy to read) 6 pts - Required classes/methods and functionalities implemented 8 pts - Your program minimally need to have the following functionalities: 1.2 points: Appropriate components such as textfields, labels, etc. are shown under the "Club Creation and Club Select" tabs. 2. 1 point: When the "Create a Club" button is pushed, the club information is added on the right panel in the correct order and the message of 'club added" shows up. 3. 1 point: Error handing in case some field is not filled. 4. 1 point: Error handing in case non integer is entered for the number of members (under Club Creation) 5. 1 point: Whenever a new club is added in the club creation panel, its corresponding CheckBox is added in the club selection pane. 6.2 points: When a check box in the club selection pane is checked or unchecked, the total number of members for selected clubs needs to be computed and updated in the label to display it. Total points: 20 import javafx. application. Application; import javafx. stage. Stage; import javafx.scene. Scene; import javafx. scene.control. Tab; import javafx. scene.control. TabPane; import javafx. scene. layout. StackPane; import java.util.ArrayList; public class Assignment6 extends Application private TabPane tabPane; private CreatePane createPane; private Select Pane select Pane; private ArrayList clubList; public void start(Stage stage) StackPane root = new StackPane(); 1/clubList to be used in both createPane & selectPane clubList = new ArrayList(); selectPane = new SelectPane (ClubList); createPane = new CreatePane(clubList, selectPane); tabPane = new TabPane(); Tab tab1 = new Tab(); tab1.setText("Club Creation"); tab1.setContent(createPane); Tab tab2 = new Tab(); tab2.setText("Club Selection"); tab2.setContent(selectPane); tabPane.getSelectionModel().select(0); tabPane.getTabs() .addAll(tabi, tab2); root.getChildren() .add(tabPane); Scene scene = new Scene(root, 900, 400); stage. setTitle("Club Selection Apps"); stage. set Scene(scene); stage.show(); public static void main(String[] args) launch(args); import java.util.ArrayList; import javafx. scene. layout. HBox; import javafx.event. ActionEvent; import javafx.event. EventHandler; //**Need to import //**Need to import 1/import all other necessary javafx classes here //--- public class CreatePane extends HBox ArrayList clubList; //The relationship between CreatePane and Select Pane is Aggregation private SelectPane selectPane; //constructor public CreatePane(ArrayList list, Select Pane sePane) this.clubList = list; this.selectPane = sePane; 1/initialize each instance variable (textfields, labels, textarea, button, etc.) 1/and set up the layout // ---- //create a GridPane hold those labels & text fields //you can choose to use .setPadding() or setHgap(), setVgap() //to control the spacing and gap, etc. 11. //You might need to create a sub pane to hold the button //--- //Set up the layout for the left half of the CreatePane. //the right half of the CreatePane is simply a TextArea object //Note: a Scrollpane will be added to it automatically when there are no //enough space 1 / Add the left half and right half to the CreatePane / /Note: CreatePane extends from HBox //-- //register/link source object with event handler //--- } //end of constructor //Create a ButtonHandler class //ButtonHandler listens to see if the button "Create" is pushed or not, 1 / When the event occurs, it get a club's Title, its number of members, and its university 1/information from the relevant text fields, then create a new club and add it inside //the clubList. Meanwhile it will display the club's information inside the text area. //using the tostring method of the club class. //It also does error checking in case any of the text fields are empty, //or a non-numeric value was entered for its number of members private class ButtonHandler implements EventHandler //Override the abstact method handle() public void handle(ActionEvent event) 1/declare any necessary local variables here 1/when a text field is empty and the button is pushed //if (// ) 1/handle the case here 1/else //for all other cases 1/when a non-numeric value was entered for its number of members //and the button is pushed //you will need to use try & catch block to catch 1/the Number FormatException // ---- // When a club of an existing club name in the list //was attempted to be added, do not add it to the list //and display a message "Club not added - duplicate" //at the end, don't forget to update the new arrayList //information on the Select Panel //} } //end of handle() method } //end of ButtonHandler class import javafx. scene.control. Label; import javafx. scene.control. CheckBox; import javafx. scene. layout. *; import javafx.event. ActionEvent; //**Need to import import javafx.event. EventHandler; //**Need to import import java.util.ArrayList; import javafx.collections. ObservableList; import javafx. scene. Node; 1/import all other necessary javafx classes here public class Select Pane extends Border Pane private ArrayList clubList; //constructor public SelectPane(ArrayList list) //initialize instance variables this.clubList = list; // set up the layout //create an empty pane where you can add check boxes later // //Select Pane is a Border Pane - add the components here // } //end of constructor //This method uses the newly added parameter Club object 1/to create a CheckBox and add it to a pane created in the constructor 1/Such check box needs to be linked to its handler class public void updateClubList(Club newclub) // //create a SelectionHandler class private class SelectionHandler implements EventHandler ActionEvent> I/Override the abstact method handle() public void handle(ActionEvent event) 1/When any radio button is selected or unselected //the total number of members of selected clubs should be updated // and displayed using a label. } //end of SelectHandler class } //end of Select Pane class public class Club private String clubName; private int numberOfMembers; private String university; / /Constructor to initialize all member variables public club) clubName = "?"; university = "?"; number of Members = 0; //Accessor method for club name public String getclubName() return clubName; / / Accessor method for university public String getUniversity) return university; 1 / Accessor method for number of members public int get NumberOfMembers() return number of Members; //mutator/modifider method for club name public void setClubName(String someClubName) clubName = someClubName; //mutator/modifider method for university public void setUniversity(String someUniversity) university = someUniversity; //mutator/modifider method for number of members public void setNumberOfMembers(int someNumber) number of Members = someNumber; //toString() method returns a string containg its name, number of members, and university public String toString() String result = " Club Name: \t\t" + clubName + " Number of Members:\t" + numberOfMembers + " University:\t\t" + university + " "; return result; Minimal Submitted Files You are required, but not limited, to turn in the following source file: Assignment.java (Download this file and use it as your driver program for this assignment.) CreatePane.java a (Download this file. You need to add more code to complete it.) SelectPane.java (Download this file. You need to add more code to complete it.) Club.java a (Download this file) Requirements to get full credits in Documentation The assignment number, your name, StudentID, Lecture day/time, and a class description need to be included at the top of each file/class. A description of each method is also needed. Some additional comments inside of methods (especially for a "main" method) to explain code that are hard to follow should be written. New Skills to be applied In addition to what has been covered in previous assignments, the use of the following items, discussed in class, will probably be needed: JavaFX, ArrayList Classes may be needed: Button, TextField, TextArea, Label, CheckButton, and ActionHandler. You may use other classes. Program Description Class Diagram: Application defined in javafx application Club CreatePane -clubList:ArrayList -selectPane.SelectPane Assignment +CreatePane(ArrayList SelectPane) -tabPane TabPane -createPane.CreatePane -selectPane:SelectPane -chubList.ArrayList SelectPane -chubList:ArrayList -start(Stage) void +SelectPane(ArrayList) +updateClubList(Club) SelectionHandler ButtonHandler thandle(ActionEvent) void +handle(ActionEvent):void Write a Java program that generates GUI (Graphical User Interface). Your program should provide labels and textfields to a user to enter information regarding clubs. The GUI of your program should contain two tabs. The first tab is labeled "Club creation" and the second tab is labeled 'Club Selection". The size of the applet here is approximately 900 X 400). The section under the first tab should be divided into two parts: The left part contains labels, textfields, and a button for a user to enter a club information. The right part shows "No Club' at the beginning (it is done using TextArea). Club Selection Apps Club Creation Club Selection No Club Number of Members University Create a Club A user can enter the information of a club, and push "Create a Club" button. Club Selection App Club Creation Club Selection No Club The Hiking Club Number of Members 42 University ASU Create a Club Club Selection Appa Club Creation Club Selection Club added Club Name: Number Of M University Hiking Club 12 Te Number of Members University CAR Club Then the club information should appear on the right hand side panel (note that the format of the club information can use toString() method of the Club class). A message "Club added" should also appear with red color at the top of the panel. Error handling: 1. If a user forgets to enter some field and pushes 'Create a Club" button, show a message "Please fill all fields" with red color, and nothing should be added to the right hand side panel. Cub Selection Appa Club Selection Club Creation Paola fields Swimming Club Number of Members 35 Club Name: Hiking Club Number Of Members 42 University ASU University Create a Club 2. If a user enters non integer in the field for the number of member, and pushes "Create a club" button, show a message "Please enter an integer for a number of members." with red color and nothing should be added to the right hand side panel. Cub Selection Apps Club Creation Cub Selection e ter an integer for number of members P Club Name Hiking Club Number Of Momberg. 42 University ASU Title Swimming Club Number of Members thirty Lininity Create a Club After entering multiple clubs, the GUI will have the following appearance. Club Selection Apps Club Selection Club Creation Club added Club Name: Hiking Club Number or Members: 42 University ASU Number of Members Universty Club Name: Robotics Club Number or Member: 28 University UoA Create a Club Club Name: Gaming Club Number or Member: 57 Univery: NAU Under the "Club Selection tab, a user can select from those created clubs. The list of created clubs should be made using a pane containing multiple check boxes. Above the pane containing check boxes, there should be a label to display "Select some clubs". Below the pane with check boxes, there should be a label to display "The total number of members for the selected club(s): 0". However this label should change to show a different number of members every time a check box is checked or unchecked. The list of clubs under the Club Selection tab should be exactly same as the list under "Club Creation" tab. Club Selection Appa Club Creation Club Selection Select some club Club Name: Mixing Club Number or Members: 22 University ABU Club Name: Robotics Club Number or Members: 28 Univerly UA Club Name Gaming Club Number or Members: 57 University NAU The total number of members for the selected clubs: 0 A user can check some check boxes. Every time one of the check boxes in the pane is checked or unchecked, then your program should compute the total number of members of the selected (checked) clubs and it needs to be updated in the label being displayed below. Club Selection Apps Club Creation Club Selection Select some clubs cub Name Hiking Club Number Of Members 42 University ASU Club Name Robotics Club Number Of Mombers 28 University of Club Name Gaming Club Number Of Members 57 University NAU The total number of members for the selected club 99 Club Selection Apps Club Creation Club Selection X Sinct some clubs Club Name: Number Of M Unity Hiking Club ars 42 Club Rob TK 28 Cuts Number of M C Garning Club onk S7 Number Of M Liity The total number of members for the selected clubs 28 A user should be able to go back and forth between "Club Creation" tab and "Club Selection" tab, and these two panels need to have a same list of Class description Select Pane SelectPane class should contain at least the following instance variable: Attribute name Attribute type Description club List ArrayList a list of club objects public SelectPane(ArrayList clubList) where the parameter 'clubList" is passed from the Assignment6 class. The constructor layouts and organizes nodes/components in this panel. You will be adding more variables (nodes/components) than what is listed here, including check boxes, and labels. An object of some pane (maybe VBox) needs to be created, where check boxes will be added later on, and it needs to be added to this SelectPane. public void updateClubList(Club newClub) This method creates an object of CheckBox using the toString method of the parameter object "newClub". Then the check box should be added to the pane that was initially added to the SelectPane in the constructor. This class contains a nested class called SelectionHandler class that implements EventHandler interface. Thus you need to define its handle method that is supposed to check which check boxes are checked, and compute and update the total number of members of selected clubs whenever one check box is checked or unchecked. CreatePane CreatePane should contain at least the following instance variable: Attribute name Attribute type Description ArrayList a list of Club objects. selectPane SelectPane an object of SelectPane. public CreatePane(ArrayList clubList, SelectPane selectPane) where the parameter 'clubList' is passed from the Assignment class and the second parameter is an object of SelectPane. The constructor layouts and organizes components in this panel. You will be adding more variables (nodes/components) than what is listed here, including labels, textfields, a button, and a text area. This class contains a nested class called ButtonHandler class that implements EventHandler interface. Thus the ButtonHandler needs to have a definition for handle method that adds some information of a club to the list and does error handling. See the UML class diagram for the parameter and return type of this method. In the handle method, you need to extract the information from the textfields. Then you can instantiate an object of the Club class and set its variable values using these values from the textfields. You can use the toString() method of the Club object to display the information on the textarea on the right hand side and also add the Club object to the clubList". Assignment class Assignment extends Application defined in javafx application package and should initialize itself by setting its size. It contains at least following instance variables: Attribute name Attribute type Description clubList ArrayList a list of club objects. It will be used in both CreatePane and SelectPane. selectPane SelectPane an object of SelectPane. createPane CreatePane an object of CreatePane. tabPane TabPane an object of TabPane. It will contain createPane and selectPane under each tab. Grading Policy: submit assignment on time indicate assignment number, name, lecture time, and description of each class clearly in each submitted java file 5 pts - Documentation (header with your name, your information, and program description for every class/lile and comment/description within your code for every method) 1 pt - Indentation and spacing (easy to read) 6 pts - Required classes/methods and functionalities implemented 8 pts - Your program minimally need to have the following functionalities: 1.2 points: Appropriate components such as textfields, labels, etc. are shown under the "Club Creation and Club Select" tabs. 2. 1 point: When the "Create a Club" button is pushed, the club information is added on the right panel in the correct order and the message of 'club added" shows up. 3. 1 point: Error handing in case some field is not filled. 4. 1 point: Error handing in case non integer is entered for the number of members (under Club Creation) 5. 1 point: Whenever a new club is added in the club creation panel, its corresponding CheckBox is added in the club selection pane. 6.2 points: When a check box in the club selection pane is checked or unchecked, the total number of members for selected clubs needs to be computed and updated in the label to display it. Total points: 20 import javafx. application. Application; import javafx. stage. Stage; import javafx.scene. Scene; import javafx. scene.control. Tab; import javafx. scene.control. TabPane; import javafx. scene. layout. StackPane; import java.util.ArrayList; public class Assignment6 extends Application private TabPane tabPane; private CreatePane createPane; private Select Pane select Pane; private ArrayList clubList; public void start(Stage stage) StackPane root = new StackPane(); 1/clubList to be used in both createPane & selectPane clubList = new ArrayList(); selectPane = new SelectPane (ClubList); createPane = new CreatePane(clubList, selectPane); tabPane = new TabPane(); Tab tab1 = new Tab(); tab1.setText("Club Creation"); tab1.setContent(createPane); Tab tab2 = new Tab(); tab2.setText("Club Selection"); tab2.setContent(selectPane); tabPane.getSelectionModel().select(0); tabPane.getTabs() .addAll(tabi, tab2); root.getChildren() .add(tabPane); Scene scene = new Scene(root, 900, 400); stage. setTitle("Club Selection Apps"); stage. set Scene(scene); stage.show(); public static void main(String[] args) launch(args); import java.util.ArrayList; import javafx. scene. layout. HBox; import javafx.event. ActionEvent; import javafx.event. EventHandler; //**Need to import //**Need to import 1/import all other necessary javafx classes here //--- public class CreatePane extends HBox ArrayList clubList; //The relationship between CreatePane and Select Pane is Aggregation private SelectPane selectPane; //constructor public CreatePane(ArrayList list, Select Pane sePane) this.clubList = list; this.selectPane = sePane; 1/initialize each instance variable (textfields, labels, textarea, button, etc.) 1/and set up the layout // ---- //create a GridPane hold those labels & text fields //you can choose to use .setPadding() or setHgap(), setVgap() //to control the spacing and gap, etc. 11. //You might need to create a sub pane to hold the button //--- //Set up the layout for the left half of the CreatePane. //the right half of the CreatePane is simply a TextArea object //Note: a Scrollpane will be added to it automatically when there are no //enough space 1 / Add the left half and right half to the CreatePane / /Note: CreatePane extends from HBox //-- //register/link source object with event handler //--- } //end of constructor //Create a ButtonHandler class //ButtonHandler listens to see if the button "Create" is pushed or not, 1 / When the event occurs, it get a club's Title, its number of members, and its university 1/information from the relevant text fields, then create a new club and add it inside //the clubList. Meanwhile it will display the club's information inside the text area. //using the tostring method of the club class. //It also does error checking in case any of the text fields are empty, //or a non-numeric value was entered for its number of members private class ButtonHandler implements EventHandler //Override the abstact method handle() public void handle(ActionEvent event) 1/declare any necessary local variables here 1/when a text field is empty and the button is pushed //if (// ) 1/handle the case here 1/else //for all other cases 1/when a non-numeric value was entered for its number of members //and the button is pushed //you will need to use try & catch block to catch 1/the Number FormatException // ---- // When a club of an existing club name in the list //was attempted to be added, do not add it to the list //and display a message "Club not added - duplicate" //at the end, don't forget to update the new arrayList //information on the Select Panel //} } //end of handle() method } //end of ButtonHandler class import javafx. scene.control. Label; import javafx. scene.control. CheckBox; import javafx. scene. layout. *; import javafx.event. ActionEvent; //**Need to import import javafx.event. EventHandler; //**Need to import import java.util.ArrayList; import javafx.collections. ObservableList; import javafx. scene. Node; 1/import all other necessary javafx classes here public class Select Pane extends Border Pane private ArrayList clubList; //constructor public SelectPane(ArrayList list) //initialize instance variables this.clubList = list; // set up the layout //create an empty pane where you can add check boxes later // //Select Pane is a Border Pane - add the components here // } //end of constructor //This method uses the newly added parameter Club object 1/to create a CheckBox and add it to a pane created in the constructor 1/Such check box needs to be linked to its handler class public void updateClubList(Club newclub) // //create a SelectionHandler class private class SelectionHandler implements EventHandler ActionEvent> I/Override the abstact method handle() public void handle(ActionEvent event) 1/When any radio button is selected or unselected //the total number of members of selected clubs should be updated // and displayed using a label. } //end of SelectHandler class } //end of Select Pane class public class Club private String clubName; private int numberOfMembers; private String university; / /Constructor to initialize all member variables public club) clubName = "?"; university = "?"; number of Members = 0; //Accessor method for club name public String getclubName() return clubName; / / Accessor method for university public String getUniversity) return university; 1 / Accessor method for number of members public int get NumberOfMembers() return number of Members; //mutator/modifider method for club name public void setClubName(String someClubName) clubName = someClubName; //mutator/modifider method for university public void setUniversity(String someUniversity) university = someUniversity; //mutator/modifider method for number of members public void setNumberOfMembers(int someNumber) number of Members = someNumber; //toString() method returns a string containg its name, number of members, and university public String toString() String result = " Club Name: \t\t" + clubName + " Number of Members:\t" + numberOfMembers + " University:\t\t" + university + " "; return result