You are on page 1of 3

Java Programming COMP-228

FINAL TEST – Final

Student: ______________________

Be sure to read the following general instructions carefully:


- This assignment test must be completed individually by all the students.
- You MUST use IntelliJ Idea to develop the code
- You should submit a VIDEO demo and the entire project through dropbox link on
eCentennial immediately after demonstration. Without submitting a video demo you will be
penalized at least 30 percent of the total grade even if everything works well.

Exercise 1

Start a new Java project. Name the project: YourFullName_COMP228_SecXX_TestFall2021.


For example: JohnSmith_COMP228_Sec012_TestFall2016. DO NOT create a package in this
project. Let IntelliJ create the default package.

Write a GUI application in Java using JavaFX that allows user to:
1) Add car information to a database. You must create all eight fields shown in the next page
screenshot and follow the same design. The car type combo box should have 3 values
SUV/Sedan/Van. By adding a new car the new entry should appear in the table view.
2) Delete selected cars from the database. The car should be selected by clicking on the table
view row.
3) Filter table of cars by selecting make, model, type, year range, location, mileage range, and
price range. If all conditions are provided regarding make, type, model, year, location,
mileage, and price, all of them should be applied to the filter function. If they are provided
partially, only the ones that are not empty should be considered to filter the data. Please
make sure in your video demo you show insert data, delete data, and all filtering
combinations. If your UI does not work properly, at least demo the data insert, delete, and
access data.

Final Lab Test Page 1 of 3


Java Programming COMP-228

The application should retrieve the car information from an Oracle table named Car. Here is the
definition of the table:

CREATE TABLE Car (


carID integer NOT NULL,
make varchar (20) NOT NULL,
model varchar (100) NOT NULL,
type varchar (100) NOT NULL,
b_year integer NOT NULL,
location varchar (100) NOT NULL,
mileage integer NOT NULL,
price integer NOT NULL,
PRIMARY KEY (carID)
);

Populate the table with several rows as below:

INSERT INTO Car VALUES(1,'BMW','X4','SUV',2019, 'Toronto',42000,33000);


Final Lab Test Page 2 of 3
Java Programming COMP-228

commit;

Use the most appropriate layout manager classes to implement the layout of this GUI.
(100 marks)

Evaluation:
Functionality
Correct implementation of UI (using 35%
JavaFX components, event handling)
Correct implementation of data access 50%
using JDBC (connecting with server,
executing a prepared statement,
displaying results)
Comments, correct naming of variables, 5%
methods, classes, etc.
Friendly input/output 10%
Total 100%

Without Video Demo -30%

Final Lab Test Page 3 of 3

You might also like