Cst205 Object Oriented Programming Using Java, December 2022
Cst205 Object Oriented Programming Using Java, December 2022
CoLt
0800csT205L22roL
8 Illustrate the creation of arraylist with the help of a sample program. (3)
9 Compare Swing API and AWT API. (3)
l0 What are layout managers? List any twolayout managers. (3)
PART B
Answer any onefull questionfrom each module. Each question carries 14 morks
Module I
ll a considlr the problem o,f a Service Station which provides three types of (10)
services to its customers: refuelling, vehicle maintenance and parking.
L
Customer can pay using cash, card or cftreque. The pricing for vehicle
maintenance depends on the cost of parts and labour. Parking areas are rented
according to weekly and monthly rates. Construct an UML class diagram for
the above problem by identiffingatleast six entities in the system which can
be represented using classes and show the relationship between them.
b Describe programming structure of Java that deals with the organization of (4)
Java code.
12a Differentiate between the two main approaches of software design. (7)
Page lof3
-,--,
0800csT205L22L0t
b Construct a UML Activity diagram for an online Hotel Reservation System, (7)
which shows the flow of activities for booking rooms at a hotel.
Module 2
13 a Write aJava program by creating a'student' class having the following data (7)
object ofthe Student class and get the required details from user and display
the average marks ofthat student.
b Write a javaprogram that illustrates how'this' keyword can be used to resolve (7)
user. The characters read from file has to be reversed and displayed on
b Explain the concept of Serialization and demonstrate how an object can be (7)
ierialized *ittt u sample program.
Module 4
17 a Illustrate the event handling mechanifr'r in Java using the Delegation Eveni (S)
Page 2of3
6ffif;1'95122l:fr
b Exdsin how ActionEvent class and FocusEvent class is used widr emfusis (7)
on tb nrcthods and cffimfl} provided by ttre given classes
-:'
Module 5
lg a fir$t€xt$eld
Write aJavaprogGffin that usestrwffitfields and abutton. The (9)
acc@s ternperature ia Celsius. When the 'Convert' button is clbld the
s@md textfield di$ays the tem@rture in Fahrenheit. Use aplopriate
. Swing compurents erd event handliqg techniques. F{C*9 /5)+32
b Deseribe the two difPerent ways to creat€ fames using Swing package with (5)
appropriate exurrylcs.
29 a Dims the Modcl View Controlter (lVfVC) Architecture using a dkryam. (n
Also'list'wt $c dr*gm'cf unitingprqrdns based on MVC Architedur€.
li b Explain the various @s fur connw*ing tq'databes€ using JDBC API, u*rg a (a
sample program.
-: 'JF?
Pqe hf 3