CS_s3
CS_s3
Module 1
Part A Questions
QDescribe the role of JIT compiler.
Q a )Explain any four object oriented features of Java with suitable examples.
B) Draw a UML class diagram which shows structure and attributes of an ATM
with entities Bank, ATM, Debit Card, Customer, Account, ATM Transaction.
Q Consider the problem of a Service Station which provides three types of
services to its customers: refuelling, vehicle maintenance and parking.
Customer can pay using cash, card or cheque. 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 identifyingatleast six entities in the system which can
be represented using classes and show the relationship between them.
Describe programming structure of Java that deals with the organization of
Java code.
Part A Questions
Q. Explain the use of static variable with the help of an example.
Q Can final modifier be used with an abstract class. Justify your answer..
Q Explain the concept of method overloading with the help ofa program.
What is inheritance? Illustrate hierarchical inheritance using a sample
program.
Module 3
Part A Questions
Part B Questions
Q a How do you create user defined exceptions in Java? Write a Java program to
find the average of n numbers entered as command line arguments. Raise a
user defined exception if the average exceeds 100.
b Explain the use of interface in Java.
Q Write a program to read the first n characters in a file where n is given by the
user. The characters read from file has to be reversed and displayed on
screen. Built in methods can be used in the program.
Explain the role of access modifiers when packages are used in Java.
Part A Questions
Q List any three event sources and their corresponding event types and listeners used
.
Q Illustrate the creation of arraylist with the help ofa sample program.
Q List any three event listeners and the corresponding source object.
Part B Questions
Q
a) Write a multithreaded Java program with two threads. One thread generates
even numbers from I to 100 and another thread generates odd numbers from I
to 100. Ensure that the threads do not interfere.
b) Discuss the methods for String comparison with examples.
Q
a) Explain how event handling is done in Java.
b) How do you access the elements in an AeayList? Illustrate with an example
Q
Illustrate the event handling mechanisil in Java using the Delegation Event
Model with the help ofa diagram.
Illustrate the usage of the following methods related to String with appropriate
sample code.
(i) find() (ii)substring() (iii) replace()
Part A Questions
Q Compare Swing API and AWT API.
Part B Questions
Q
a) Discuss the Model View Controller (MVC) Architecture using a diagram.
Also list out the advantages of writing programs based on MVC Architecture
b) Explain the various steps for connecting to database using JDBC API, using a
sample program.