1904302-object-oriented-programming
1904302-object-oriented-programming
INFORMATION TECHNOLOGY
QUESTION BANK
III SEMESTER
1904302–Object Oriented Programming
Regulation – 2019
Prepared by
PART – A
Q.
Questions BT Level Competence
No.
1 Define abstract class. BTL1 Remembering
2 What is the use of Inheritance and what are its advantages? BTL1 Remembering
3 List the methods provided by the object class. BTL1 Remembering
4 Tell how interfaces can be extended. BTL1 Remembering
5 Define Interface. BTL1 Remembering
List the order of execution of constructor during creation of class
6 BTL1 Remembering
hierarchy?
7 How can you access the super class version of an overridden method? How? BTL2 Understanding
8 Do you declare private and protected modifiers for variables in interfaces? BTL2 Understanding
Justify
9 Infer how to access interface variables. BTL2 Understanding
10 Illustrate ‘static’ keyword and its use. BTL2 Understanding
11 List down the uses of final classes BTL2 Understanding
12 Whether a subclass can access all members of super class? How? BTL3 Applying
13 Can we instantiate an abstract class? Justify BTL3 Applying
14 Deduce the meaning for the keywords: final, finalize. BTL3 Applying
15 When to use final variable and method? BTL3 Applying
16 What is the difference between superclass and subclass? BTL4 Analyzing
17 What is the difference between classes and interface? BTL4 Analyzing
18 What will be the effect if an abstract class is private? BTL4 Analyzing
19 Does java support multiple inheritance? BTL4 Analyzing
20 Does a class implement more than one interface? Write an example for it. BTL5 Evaluating
21 What's the difference between an interface and an abstract class? BTL5 Evaluating
22 How to make a statement execute before the main method is invoked by JVM? BTL5 Evaluating
23 How to create an inner class? BTL6 Creating
24 Write a simple program to implement abstract class. BTL6 Creating
PART – B
Where you use final keyword in java ? Explain with illustrative Program(15)
1 BTL5 Evaluating
What is inheritance? How inheritance is implemented in java? Create a
class Book and define display method to display book information. Inherit
2 Reference_Book and Magazine classes from Book class and override BTL5 Evaluating
display method of Book class in Reference_Book and Magazine classes.
Make necessary assumptions required.(15)
Develop an Interest interface which contains simpleInterest and
3 compInterest methods and static final field of Rate 25%. Write a class to BTL5 Evaluating
implement those methods.(15)
Create an abstract Reservation class which has Reserve() abstract
4 method. Implement the sub-classes like ReserveTrain and ReserveBus BTL6 Creating
classes and implement the same. Use necessary variables, methods for
reserving tickets(15)
5 What is abstract class? Explain situations in which abstract classes are BTL6 Creating
used.(15)
UNIT V EVENTDRIVENPROGRAMMING
Graphics programming - Frame – Components - working with 2D shapes - Using color and fonts, -
Basics of event handling - event handlers - adapter classes - actions - AWT event hierarchy.
PART – A
Q.
Questions BT Level Competence
No.
1 Define Event Listener. BTL1 Remembering
2 List the methods contained in EventObject class. BTL1 Remembering
3 Define canvas and window. BTL1 Remembering
4 List the various methods available for drawing polygons, ellipses, arcs. BTL1 Remembering
5 Define the component class. BTL1 Remembering
6 State the order of execution of applet methods. BTL1 Remembering
7 What is AWT Event class? BTL2 Understanding
8 What is the lifecycle of an Applet? BTL2 Understanding
9 What are the various controls supported by AWT? BTL2 Understanding
10 Name three Component subclasses that support painting. BTL2 Understanding
11 What is the purpose of the enableEvents() method? BTL2 Understanding
12 Which package contains the methods to receive and process events and the BTL3 Applying
method that support the events?
Establish the use of color class and the methods provided by color class.
13 BTL3 Applying
14 Which containers use a border Layout as their default layout? BTL3 Applying
15 How to place controls in a window and remove controls from a window? BTL3 Applying
16 Which event is generated during checkbox operations? BTL4 Analyzing
17 When the frame window is visible? BTL4 Analyzing
18 What is the difference between init() and start() method? BTL4 Analyzing
19 Identify the constants associated with Adjustment Event class. BTL4 Analyzing
20 Assess what happens when we call repaint() method. BTL5 Evaluating
21 How would you change the location of the event and get the co-ordinates of BTL5 Evaluating
an event occurred?
What class is the top of the AWT event hierarchy?
22 BTL5 Evaluating
23 How will you create an object of an item event? BTL6 Creating
24 How will you create a TextArea object and TextField object? BTL6 Creating
PART – B
1 Describe AWT controls in detail.(13) BTL1 Remembering
2 List and explain the 2D Geometric Primitives.(13) BTL1 Remembering
3 State and Explain the basic ofAWT Event handling in detail.(13) BTL1 Remembering
i. Describe the AWT event hierarchy(6)
4 BTL1 Remembering
ii. Describe the adapter classes using example(7)
Illustrate briefly about the working of frames and setting the properties to
5 BTL2 Understanding
it.(13)
Summarize the component class and clearly explain its various
6 BTL2 Understanding
methods.(13)
7 Identify the methods of graphic class in applet.(13) BTL2 Understanding
8 What is the use of WindowListener? (13) BTL2 Understanding
9 Explain the Action Listener with simple program.(13) BTL3 Applying
10 Explain the event delegation approach and event listener.(13) BTL3 Applying
How applet differs from applications and explains the applet life cycle in
11 BTL3 Applying
brief? (13)
Which steps are must for event handling and what are the models available
12 BTL4 Analyzing
for event handling?(13)
Analyze the Creating Frame Window by Instantiating and extending Frame
13 BTL4 Analyzing
class.(13)
Write an AWT GUI application. Each time the "Count" button is clicked,
14 BTL4 Analyzing
the counter value shall increase by 1.(13)
Can you write a program to draw 2D circle, rectangles and Fill those
15 BTL5 Evaluating
shapes with solid colors.(13)
How are the elements of different layouts organized? Explain with suitable
16 BTL5 Evaluating
code
Create a simple menu application that enables a user to select one of the following
17 BTL6 Creating
items:
a. Radio1 b. Radio2 c. Radio3 d. Radio4 e. Radio5
i. From the menu bar of the application (5)
ii. From a pop-up menu (4)
iii.From a toolbar (4)
PART – C
Write a java program to construct a shape by adding a rectangle to an
1 BTL5 Evaluating
ellipse.(15)
Write a java program to implement a 3 frame in a window, In each frame
2 create rectangle and fill each one with BTL5 Evaluating
(i) color (ii) texture and (iii) gradient.(15)
Write a java program to implement event handling by implementing
3 BTL6 Creating
ActionListener(15).
Write a java program to draw basic shapes using a GUI application.(15)
4 BTL6 Creating
Write a program to create a frame with the following menus, such that the
5 BTL6 Creating
corresponding geometric object is created when a menu is clicked.
a. Circle. (4)
b. Rectangle. (4)
c. Line. (4)
d. Diagonal for the rectangle. (3)