0% found this document useful (0 votes)
23 views

[Model Paper] MIT 512-2 Object Oriented Programming

This document outlines the examination instructions for the Master of Information Technology course at Uva Wellassa University, focusing on Object Oriented Programming. Candidates are required to answer two questions involving mathematical computations, Java programming, MySQL database creation, and GUI design. Submissions must include a PDF of the answer script and a compressed folder of Java files and project folders, both named according to the candidate's registration number.

Uploaded by

mit23075
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

[Model Paper] MIT 512-2 Object Oriented Programming

This document outlines the examination instructions for the Master of Information Technology course at Uva Wellassa University, focusing on Object Oriented Programming. Candidates are required to answer two questions involving mathematical computations, Java programming, MySQL database creation, and GUI design. Submissions must include a PDF of the answer script and a compressed folder of Java files and project folders, both named according to the candidate's registration number.

Uploaded by

mit23075
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Uva Wellassa University of Sri Lanka

Postgraduate Unit / BoS – Computing and Informatics


Master of Information Technology
Semester II Examination – Sept./Oct. 2024
MIT 512-2 Object Oriented Programming

Instructions to candidates
Number of Pages: 02
Total time allocation: Two (02) hours
Total mark allocation: 100 marks
Number of questions: 02
Answer All Questions.
Save your answers in a MS Word file including the screen-shots of the output(s) of your programs.
Finally, convert it to a PDF file and rename with your Registration Number. (Ex. “MIT_23_152.pdf”)
Also, include all your .Java files and NetBeans Project Folder(s) in to a single folder, rename with
your Registration Number then compress (.zip) it. (Ex. “MIT_23_152.zip”)
Upload:
1. PDF file which consists of the Answer Script
2. Compressed (.zip) folder which consist of the .Java files and NetBeans Project files
To the VLE.

1.
a.
i. Find all possible values for y having 0.1 intervals:
y = -3x3 + 5 where -1 < x < 1
(5 marks)
ii. Write a Java program to store the above part (i) computed x and y combinations in a
two-dimensional (2D) array. Use a for loop to print the array elements.
(10 marks)
b. Solve the following simultaneous equations to find x and y:
3x -y = 10
x2 + y2 = 100
(10 marks)
2.
a. Download the “Sample_Data.xlsx.” from VLE. Open the corresponding tab of the MS
Excel sheet according to the last digit of your Registration Number. Ex. If your Registration
Number is: UWU/MIT/23/152, go to the second tab. (if the last digit of your Registration
Number is ‘0’, then open the last tab.)
i. Create a Database in MySQL Workbench.
(5 marks)
ii. Create a Table in the Database you created in part (i). Then insert the sample data
available in the MS Excel sheet (in the relevant tab). (Please attach screen-shots
illustrating the Table structure and data in the Answer Script.)
(10 marks)
b.
i. Create a new Java Project using Apache NetBeans IDE. Add “mysql-connector-j-
9.0.0.jar” to the Project’s Libraries. (Please attach screen-shots in the Answer Script.
Intermediate steps are not necessary.)

Page 1 of 3
(10 marks)
ii. Perform other necessary configurations to connect the SQL database to the Java
application. (Please attach screen-shots in the Answer Script. Intermediate steps are
not necessary.)
(10 marks)
c.
i. Design the following (Fig. 01) Graphical User Interface (GUI). The default values of
the controls (i.e., Text appearing on the combo-boxes) may be different since your
application domain (and related data) might not be the same.
Find the control type in the Table 1.

Figure 01: Graphical User Interface for the Database Application

Table 1: Controls in the GUI


Number Control Number Controls
1, 6 & 8 Text Field 7, 11 & 14 Button
2 Check Box 9, 10 & 13 Table
3 Combo Box 12 Text Area
4, 5 Radio Button
(15 marks)
ii. Write Java code to implement the following functionalities:
• Obtain the Table name as a user input from the Text Field (Labeled as 1 or 8).
• Once the Check Box (Labeled as 2) is not checked, controls 3 to 6 should be
disabled. (Once checked, enable all of them.).
• Obtain the column of the Table for the filtering (Search) purpose from the
Combo Box (Labeled as 3).
• Only one of the Radio Buttons (4 /5) should be selected at a time.
• Obtain the filtering (Search) terms from the Text Field (Labeled as 6).
o Example 1: When Radio Button 4 is selected; the full name of the doctor
(in this example, i.e., “Sunil Perera”).
o Example 1: When Radio Button 5 is selected; “s%”.
• Once the Button (Labeled as 7) is clicked, the generated SQL statement should be
displayed in the Text Area (Labeled as 12).
• When the Button (Labeled as 14) is clicked, execute the generated SQL and fetch
the data from the database/table and display on the Table (Labeled as 13).

Page 2 of 3
• Control Labeled as 9 is a non-editable Table, you may pre-define the model
matching to the columns of the database Table.
• Control Labeled as 10 is a editable Table, allow the users to enter the
corresponding values (a single row) to the Table.
• Accordingly, when the Button (Labeled as 11) is clicked, the generated SQL
statement (INSERT INTO) should be displayed in the Text Area (Labeled as 12).
(25 marks)

[End of Paper]

Page 3 of 3

You might also like