Spring 2024 - CS506 - 2
Spring 2024 - CS506 - 2
02
Total Marks: 20
Semester: Spring 2024
Due Date: June 24 2024
CS506 – Web Design and Development
Please read the following instructions carefully before solving & submitting assignment:
Uploading Instructions:
You are allowed to use any IDE (like NetBeans IDE/IntelliJ IDEA) for this assignment development.
The submission must be a complete project folder (which should contain complete source code, Java
files, database file and builds etc.). After finalizing, compress it with Zip or RAR format, save with your
own Student ID (e.g., bc000000000.zip) and submit it at VU-LMS within the due date.
Your assignment should be in .zip /.rar format. Other file formats will not be accepted.
No assignment will be accepted through email.
Note:
o No assignment will be accepted after the due date via email in any case (whether it is the case of load
shedding or internet malfunctioning etc.). Hence refrain from uploading the assignment in the last hour of
deadline.
o It is recommended to upload the solution at least one day before its closing date.
o Do not put any query on MDB regarding this assignment, if you have any query then email at
[email protected]
GOOD LUCK
1
Assignment No. 02
Total Marks: 20
Semester: Spring 2024
Due Date: June 24 2024
CS506 – Web Design and Development
Problem Statement:
This assignment is a continuation of assignment # 1. Where, you have developed a basic Java program for an
ABC Marathon. Although the basic functionality remains the same (i.e., taking name and time as input from
user and calculating the winner). However, in this assignment, you are required to store/fetch data to/from
a backend database and display it in a table using Java Swing based GUI (i.e., Graphical User Interface)
components.
Requirements:
The program should display a GUI (i.e., Graphical User Interface) which should contain
appropriate labels, text fields, buttons and a table as shown in figure # 01.
To add a new runner, the user will provide the name and finishing time of the runner in
corresponding text fields and click on "Add Runner" button to submit. If input is valid (i.e.,
name and time are not empty, the finishing time is a positive number and same runner does
not exist in database), the data should be added in backend database. However, in case of
invalid input, the user should be prompted accordingly.
By clicking on the "Load Data" button, the program should fetch runners’ data, in ascending
order with respect to runner name, from backend database and display it in a table as shown
in figure # 02.
While clicking on the "Delete All" button, the program must remove all runners' data from
database and as well as from the table. However, the user should be prompted first before
performing the delete process as shown in figure # 03.
The button "View Winner" should be responsible for fetching the fastest three runners from
database based on the best finishing time (i.e., taking smaller number of minutes to finish the
race) and display it in the table as shown in figure # 04.
Further, cross icon at top right corner of the interface should terminate the program and
show the developer information (i.e. Student Id and name) through a message dialog as
shown in figure # 05.
2
Assignment No. 02
Total Marks: 20
Semester: Spring 2024
Due Date: June 24 2024
CS506 – Web Design and Development
Sample Output:
Fig. 1: A typical GUI for ABC Marathon Fig. 2: Displaying Data in Table
3
Assignment No. 02
Total Marks: 20
Semester: Spring 2024
Due Date: June 24 2024
CS506 – Web Design and Development
Database file:
BSxxxxxxxx.db (must be same as your own VU student id)
Note: Need to put database file in assets folder in NetBeans/IntelliJ Idea project directory; as shown below.
4
Assignment No. 02
Total Marks: 20
Semester: Spring 2024
Due Date: June 24 2024
CS506 – Web Design and Development
To download JDK setup file for Windows x32 from VU-LMS, please visit.
https://vulms.vu.edu.pk/Courses/CS506/Downloads/JDK_8.251_Windows_x32.zip
To install & create a HelloWorld Java program in NetBeans IDE, please watch;
https://vulms.vu.edu.pk/Courses/CS506/Downloads/NetBeansIDE_Installation.mp4
To use UCanAccess driver to connect with MS Access database, please watch;
https://vulms.vu.edu.pk/Courses/CS506/Downloads/UCanAccess_Driver_Installation.mp4
Good Luck