Sale!

CSE 205 Assignment #6 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (2 votes)

Program Description
Class Diagram:

Assignment 6: CSE 205: Object-Oriented Program & Data
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 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).
A user can enter the information of a club, and push “Create a Club” button.

CSE 205: Object-Oriented Program & Data
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.

2/6/2020 Assignment 6: CSE 205: Object-Oriented Program & Data (2020 Spring)
https://canvas.asu.edu/courses/44324/pages/assignment-6?module_item_id=2852880 5/10
Error handling:
1. If a user forgets to enter information into text 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.
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.
After entering multiple clubs, the GUI will have the following appearance.

CSE 205: Object-Oriented Program & Data
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.

2/6/2020 Assignment 6: CSE 205: Object-Oriented Program & Data (2020 Spring)
https://canvas.asu.edu/courses/44324/pages/assignment-6?module_item_id=2852880 7/10
The list of clubs under the Club Selection tab should be exactly same as the list under “Club Creation”
tab.
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.
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 the same list of clubs.
Class description
SelectPane
SelectPane class should contain at least the following instance variable:
Attribute name Attribute type Description
clubList ArrayList a list of club objects.
This class should have a constructor:
public SelectPane(ArrayList clubList)

CSE 205: Object-Oriented Program & Data
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
clubList ArrayList a list of Club objects.
selectPane SelectPane an object of SelectPane.
This class should have a constructor:
public CreatePane(ArrayList clubList, SelectPane selectPane)
where the parameter “clubList” is passed from the Assignment6 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”.
Assignment6 class

CSE 205: Object-Oriented Program & Data
Assignment6 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/file 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
——————————————–
What to turn in:

CSE 205: Object-Oriented Program & Data
-Submit your Assignment6.java, CreatePane.java, SelectPane.java, and Club.java files
using Gradescope-> Assignment6 on canvas.asu.edu. Make sure that it is compiling. You can submit
multiple times until the assignment deadline.
Copyright © 2020,
Arizona State University
All rights reserved.
ASU disclaimer (http://www.asu.edu/asuweb/disclaimer/)
Copying any content of this page will be a violation of the copy right.

CSE 205