联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp2

您当前位置:首页 >> Java编程Java编程

日期:2020-12-08 11:40

Java Programming COMP-228

Final Exam: Test#2 ____________Page 1 of 3

FINAL-term Exam (TEST #2)

Date: 8.30 am, Tuesday 1

st December, 2020 to Mid-night, Monday 7

th December, 2020

Marks/Weightage: 100/25%

Instructions: Be sure to read the following general instructions carefully:

This test should be completed individually by all the students.

Step1: At the start of eclipse, you must name your Eclipse workspace according to the following rule:

YourFullName_COMP228SectionNumber_Final.

For Example: JohnSmith_COMP228Sec006_Final (if your section is 006)

Step 2: And after that, you must name your Eclipse project according to the following rule:

YourFullName_COMP228SectionNumber

For Example: JohnSmith_COMP228Sec006 (if your section is 006)

Step 3: And your package should be named as follows:

YourFullName_SectionNumber_Ex01

For Example: johnsmith_sec006_ex01 (if your section is 006)

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_Final.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 Final term exam 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: Academic dishonesty in any form is not allowed. This test should be completed individually by all the

students. If you fail to upload your mid exam on or before the due date, then there will 50% deduction. And

after 24 hours past the due date, it will not be accepted.

Java Programming COMP-228

Final Exam: Test#2 ____________Page 2 of 3

Exercise 1: [100 marks]

Write a GUI application in Java that allows user to select students by their city.

GUI, you can design using Scene Builder.

The user should be able to enter the city. The application should retrieve the student information from an

Oracle table named Student. ( Or you can use MySql RDBMS which is open source)

Here is the definition of the table:

CREATE TABLE Student (

studentID char(9) NOT NULL,

firstName varchar (20) NOT NULL,

lastName varchar (20) NOT NULL,

address varchar (30) NOT NULL,

city varchar(30) NOT NULL,

province char(2) NOT NULL,

postalCode char(6) NOT NULL,

PRIMARY KEY (studentID)

);

Populate the table with at least 10 rows having different city names such as Toronto, Brampton, Montreal etc.

as below:

insert into Students values ('300111222','Sam', 'Malone', '10 Somewhere Road', 'Toronto','ON','M1Y2H2');

commit;

The information should be displayed in a JTextArea (or TextArea control of SceneBuilder) component which

has scrolling abilities. Use “\t” and “\n” to format the display.

Use the most appropriate layout manager classes to implement the layout of this GUI.

Java Programming COMP-228

Final Exam: Test#2 ____________Page 3 of 3

Evaluation:

Functionality

Correct implementation of UI (using SWING or JavaFX components, event

handling)

35%

Correct implementation of data access using JDBC (connecting with server,

executing a prepared statement, displaying results)

50%

Comments, correct naming of variables, methods, classes, etc. 5%

Friendly input/output 10%

Total 100%


版权所有:留学生编程辅导网 2018 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。