You are on page 1of 10

SULIT

BAHAGIAN PEPERIKSAAN DAN PENILAIAN


JABATAN PENDIDIKAN POLITEKNIK DAN KOLEJ KOMUNITI
KEMENTERIAN PENGAJIAN TINGGI

JABATAN TEKNOLOGI MAKLUMAT DAN KOMUNIKASI

PENILAIAN ALTERNATIF
SESI 2 : 2022/2023

DFP50273:
INTEGRATIVE PROGRAMMING AND TECHNOLOGIES

JANGAN BUKA KERTAS SOALAN INI SEHINGGA DIBERITAHU


OLEH KETUA PENGAWAS

1
INFORMATION & COMMUNICATION TECHNOLOGY DEPARTMENT
SESI 2: 2022/2023
FINAL ASSESSMENT: PRACTICAL TEST

COURSE CODE: DFP50273


COURSE NAME: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
DURATION: 2 HOURS
CLO1: Construct the elements of GUI from java package that integrates database for an
interactive GUI application ( P4, PLO 3 )

SECTION A: 100 MARKS

INSTRUCTION:
This section consists of ONE (1) practical question. Please submit the answer in softcopy form.
Please create your project name with the name “PracticalTestF(Your 4 last digit registration
number)”, example : PracticalTestF2020.

Question 1

A vendor company has appointed you to develop an enrollment system for Sunway University.
They ask you to develop an interface that collects student enrollment data using Java Swing
components and the data must be stored in a MySQL database. Your task is to:

a. Create the graphical user interface (GUI) using any appropriate layout as shown in Figure 1.
This system will allow the user to add the data into database, view data from database and
clear all the data in the field. Name this application as “STUDENT ENROLLMENT
SYSTEM SUNWAY UNIVERSITY”. The explanations for the components used are as in
the Table 1.

2
Figure 1 : Gui example

Components Details
JLabel [Title] Label with name and Color : Blue
JTextFeild [Name] Empty TextField with the specified 20 columns.
Name only can be inserted Alphabetic ONLY.
JTextFeild [Student ID] Empty TextField with the specified 20 columns.
JTextFeild [Email] Empty TextField with the specified 20 columns.
Email Must contain (@)
JComboBox [Program JComboBox that contains the elements in the specified
Level] array ["Degree " and "Diploma"]
JComboBox [Program JComboBox that contains the added elements
Name] ["Diploma in Business Administration", Diploma in
Information Technology", Diploma in Electrical
Engineering, "Diploma in Mechanical Engineering,
"Diploma in Manufacturing Technology"] and ["Degree
in Manufacturing Technology" and "Degree in Business
Administration"]
JComboBox [Session] JComboBox that contains the elements in the specified
array ["Session 1 2023" and “Session 2 2023”]
JButton Buttons with a specific name.
JTextArea [Output] Empty TextArea with the specified 8 row and 20 columns

Table 1 : Components Details

3
b. Perform the exception handling in message box to notify the user for:
i. Name must insert in Alphabetic only.
ii. Email must contain @

c. ItemListener is used for the Program Level combo box.


i. If the selected item in Program Level is "Degree" then the items in the Program Name
combo box will change to "Degree in Manufacturing Technology" and "Degree in
Business Administration" as in Figure 2 .
ii. If the selected item in Program Level is "Diploma" then the items in the Program Name
combo box will change to "Diploma in Business Administration", Diploma in
Information Technology", Diploma in Electrical Engineering, "Diploma in
Mechanical Engineering, "Diploma in Manufacturing Technology" as in Figure 3.

Figure 2: Diploma Combo Box Figure 3: Degree Combo Box

d. Create a database with a table and attributes as Table 2 below. Create all the attributes
with suitable data types.

Database Name: enrollment


Table Name: enrollment_data
Name Data Type Primary Key
name Varchar (100)
student_id Varchar (20) YES
email Varchar (100)
program_level Varchar (20)
program_name Varchar (50)
session Varchar (20)
Table 2: Database details

e. When user click on the “Submit” button, all the entered information should be stored
in database. Perform :
i. exception handling to handle successful or unsuccessful data inserted into the
database as shown in Figure 4.
ii. exception handling if the user enters the same student id as in Figure 5.

4
Figure 4 :Message Box if the data is successfully entered into the database.

5
Figure 5 : Message Box example for exception handling.

f. Your database should have all the records as shown in Figure 6.

Figure 6 : Database details


g. When user click on “View” button, the information will display in output TextArea from
database as in Figure 7.

6
Figure 7: GUI after view button is pressed.

h. When user clicks on the “Reset” button, it should clear the fields and allow user to
enter new information as in Figure 1.

7
INFORMATION AND COMMUNICATION TECHNOLOGY DEPARTMENT
PRACTICAL TEST RUBRIC |(CL01, P4)

COURSE DFP50273 COURSE NAME INTEGRATIVE PROGRAMMING AND TECHNOLOGIES


CODE
LECTURER’
S NAME
STUDENT’S REGISTRATION
NAME NUMBER

CRITERIA 4 3 2 1 0 WEIGHT CALCULA STUDE STUDE


TION NT'S NT'S
SCORE MARK
(MAX : 60
4)
PROGRAM File is able to File is able to File is able to File is not able to File is not able to 1 __ x 1/60 0.00
HANDLING open and data open and few open and some open but it can open.
can be written data is missing data is missing show error
and read from while writing and while writing and message.
file. reading from file. reading from file.
INTERFACE Excellently use Use over than Use less than Use inappropriate Use inappropriate 1 __ x 1/60 0.00
DESIGN all the 50% of the 50% of the components, and Layout and
LAYOUT components and components and components but inappropriate Components
organize them in organize them in organize them in arrangement
appropriate appropriate inappropriate
manner manner arrangement
INTERFACE Successfully use Use the correcct Use the correcct Use the Incorrect coding 2 __ x 2/60 0.00
DESIGN the correcct components and components but incorrecct for Layout and
CODE components and correctly code the inappropriate components and Components
correctly code the design design code. too many error in
design design code

8
CREATE Successfully Create database, Create database, Create database, Not create any 1 __ x 1/60 0.00
DATABASE create database, table and table and table and database
table and attributes with attributes with attributes with
attributes with suitable name unsuitable name unsuitable name
suitable name and data type. and data type. and data type.
and data type. Missing more
than one
attributes.
ITEM Successfully Implements Implements Implements Not implement 1 __ x 1/60 0.00
LISTENER implement ItemListener ItemListener ItemListener ItemListener
ItemListener interface for interface for interface for interface
interface for ComboBox with ComboBox with ComboBox with
ComboBox minor error major error major error
COMBO BOX Successfully Implements Implements Implements Not implement 1 __ x 1/60 0.00
CONDITION create coding for create coding for create coding for create coding for any code
if-else condition if-else condition if-else condition if-else condition
for comboboxs for comboboxs for comboboxs for comboboxs
with minor error with major error with major error
EXCEPTION Successfully Create Execption Create Execption Create Execption Not create any 1 __ x 1/60 0.00
HANDLING create Execption handling for 3 handling for 2 handling for 1 Exception
handling for 4 Condition Condition Condition handling
Condition
ACTION Successfully Implement Implement Implement Not implement 1 __ x 1/60 0.00
LISTENER implement ActionListener ActionListener ActionListener ActionListener
(SUBMIT, ActionListener interface for interface for interface for interface
CLEAR, interface for All Buttons with Buttons with Buttons with
VIEW)
Buttons minor error major error major error
DATABASE Successfully Able to Able to Cannot make a No Coding for 1 __ x 1/60 0.00
CONNECTION make a make a make a connection but database
connection to connection to connection to have simple connection
database database with database with coding
minor error major error

9
INSERT DATA Successfully Insert more than nsert less than Program cannot No coding to 2 __ x 2/60 0.00
INTO insert all the data 50% of the data 50% of the data insert any data insert Data
DATABASE into database into the database into the database into database but
(Accepct term have simple
and condition coding
should collect 1)
VIEW ALL Program Program displays Program display Simpe coding for No Coding to 2 __ x 2/60 0.00
DATA successfully more than 50% of less than 50% of view data but view all data
display all the the output as the output as cannot view in
data from the required with no required with TextArea
database errors. some errors
PROGRAM Program is Few Several Program is Program is poorly 1 __ x 1/60 0.00
STANDARDS stylistically well inappropriate inappropriate inappropriate written with no
designed design choices design choices design choices indentation and
complete with all (i.e. relevant (i.e. relevant (i.e. still relevant no comments at
required variable names, variable names variable names, all.
comments proper but improper improper
indentation but indentation and indentation and
missing a few missing a few no comments at
required required all)
comments) comments)
TOTAL MARKS 0.00

* Marks will deduct if students duplicates the


code program from others.

10

You might also like