Question: Question 3 ( 1 5 marks ) a ) Explain the steps of connecting a java application to a database. ( 7 marks ) b

Question 3(15 marks)
a) Explain the steps of connecting a java application to a database.
(7 marks)
b) Using java programming language, implement a class that will allow a user to connect a java program to an SQL database hosted locally on your machine.
(8 marks)
Question 4(15 marks)
a) Explain the difference between an Interface and an Abstract Class.
(2 marks)
b) Use a java program to explain how abstraction is implemented in OOP.
i. Using an Interface.
(2 marks)
ii. Using an Abstract Class
(3 marks)
c) Explain the difference between the terms compile-time and runtime.
(2 marks)
d) Use a java program to differentiate between runtime and compile-time polymorphism
(6 marks)
Question 5(15 marks)
a) Use java programming language to: -
(10 marks)
Create a custom jFrame called Login
In the constructor; Set the title of the ;Frame to Login, set the size of the jFrame and the default operation for when some clicks on close.
Create a label that notifies a user to enter the password. Create a password field for the user to enter the password. Create a button for the user to click on to log in. Add the last three components to jframe.
Display Jframe
b) Describe what is meant by exception handling, State two types of exceptions in java's exception handling mechanism.
(3 marks)
c) List any four examples of situations where exception handling is necessany.
(2 marks)
Question 3 ( 1 5 marks ) a ) Explain the steps of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!