COMP-228讲解、辅导Java程序设计、Programming编程辅导
- 首页 >> Python编程 Java Programming COMP-228
Lab #4 Page 1 of 3
COMP 228: Java Programming
Lab #4 – Developing UI using JavaFx
Due Date: Week 09 (Mid-night – 11.59 pm Sunday). Marks/Weightage: 30/7%
Purpose: The purpose of this Lab assignment is to:
• Practice the use of JavaFX.
References: Learning materials for weeks 7, 8, textbook, and other references (if any).
IDE: eclipse Java Developer edition – 2020-06/2020-09 and Windows 10 OS
Step1: At the start of eclipse, you must name your Eclipse workspace according to the following
rule:
YourFullName_COMP228SectionNumber_Lab04
For Example: JohnSmith_COMP228Sec006_Lab04 ( if your section is Sec006)
Step 2: And after that, you must name your Eclipse project according to the following rule:
YourFullName_COMP228SectionNumber
For Example: JohnSmith_COMP228Sec006
Step 3: And your package should be named as follows:
YourFullName_SectionNumber_Ex01
For Example: johnsmith_sec006_ex01
Submission/Upload Instructions:
After you complete, run and test your code, you need to do the following:
a) Close the eclipse, go to your workspace folder which you created in Step 1.
b) Zip it up. You should get a zip file like this– JohnSmith_COMP228Sec006_Lab04.zip. You
should only be submitting it in the .zip file format (and not .rar or any other format)
c) Upload this zip file using the Lab04 assignment link in e-centennial.
Apply the naming conventions for variables, methods, classes, and packages:
- variable names start with a lowercase character for the first word and uppercase for every
other word
- classes start with an uppercase character of every word
- packages use only lowercase characters
- methods start with a lowercase character for the first word and uppercase for every other
word
Note: Late submissions are accepted until up to three days past due date with 25% deductions. After
that no submission will be considered.
Java Programming COMP-228
Lab #4 Page 2 of 3
Exercise 1
Write a Java application using JavaFx which allows the user to enter student information (see the sample
design below).
The user will enter full name, address, city, province, postal code, phone number and email in text field
controls. The student’s major (Computer Science or Business) will be selected from two radio buttons.
A combo box will display the list of courses for each program whenever the user selects the desired
program.
A course will be added to a list box whenever the user selects a course from the corresponding combo
box. Make sure that the user cannot add a course several times.
Additional information about the student will be provided from a group of check boxes (such as
involvement in various activities, etc).
All the information about the student will be displayed in a text area component. Use simple JavaFX
layout managers, such as FlowPane, BorderPane, and GridPane to create the JavaFX GUI of this
application.
Java Programming COMP-228
Lab #4 Page 3 of 3
Evaluation/Rubric:
Functionality
Correct implementation of UI 40%
Correct implementation of event
handling and display of results
40%
Comments, correct naming of variables,
methods, classes, etc.
5%
Friendly input/output 15%
Total 100%
Lab #4 Page 1 of 3
COMP 228: Java Programming
Lab #4 – Developing UI using JavaFx
Due Date: Week 09 (Mid-night – 11.59 pm Sunday). Marks/Weightage: 30/7%
Purpose: The purpose of this Lab assignment is to:
• Practice the use of JavaFX.
References: Learning materials for weeks 7, 8, textbook, and other references (if any).
IDE: eclipse Java Developer edition – 2020-06/2020-09 and Windows 10 OS
Step1: At the start of eclipse, you must name your Eclipse workspace according to the following
rule:
YourFullName_COMP228SectionNumber_Lab04
For Example: JohnSmith_COMP228Sec006_Lab04 ( if your section is Sec006)
Step 2: And after that, you must name your Eclipse project according to the following rule:
YourFullName_COMP228SectionNumber
For Example: JohnSmith_COMP228Sec006
Step 3: And your package should be named as follows:
YourFullName_SectionNumber_Ex01
For Example: johnsmith_sec006_ex01
Submission/Upload Instructions:
After you complete, run and test your code, you need to do the following:
a) Close the eclipse, go to your workspace folder which you created in Step 1.
b) Zip it up. You should get a zip file like this– JohnSmith_COMP228Sec006_Lab04.zip. You
should only be submitting it in the .zip file format (and not .rar or any other format)
c) Upload this zip file using the Lab04 assignment link in e-centennial.
Apply the naming conventions for variables, methods, classes, and packages:
- variable names start with a lowercase character for the first word and uppercase for every
other word
- classes start with an uppercase character of every word
- packages use only lowercase characters
- methods start with a lowercase character for the first word and uppercase for every other
word
Note: Late submissions are accepted until up to three days past due date with 25% deductions. After
that no submission will be considered.
Java Programming COMP-228
Lab #4 Page 2 of 3
Exercise 1
Write a Java application using JavaFx which allows the user to enter student information (see the sample
design below).
The user will enter full name, address, city, province, postal code, phone number and email in text field
controls. The student’s major (Computer Science or Business) will be selected from two radio buttons.
A combo box will display the list of courses for each program whenever the user selects the desired
program.
A course will be added to a list box whenever the user selects a course from the corresponding combo
box. Make sure that the user cannot add a course several times.
Additional information about the student will be provided from a group of check boxes (such as
involvement in various activities, etc).
All the information about the student will be displayed in a text area component. Use simple JavaFX
layout managers, such as FlowPane, BorderPane, and GridPane to create the JavaFX GUI of this
application.
Java Programming COMP-228
Lab #4 Page 3 of 3
Evaluation/Rubric:
Functionality
Correct implementation of UI 40%
Correct implementation of event
handling and display of results
40%
Comments, correct naming of variables,
methods, classes, etc.
5%
Friendly input/output 15%
Total 100%