JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year OBJECT ORIENTED PROGRAMMING THROUGH JAVA Previous Question Paper (May/June - 2019 - R16)

B.Tech | II Year | I Semester | R16 | May/June - 2019

Answer PaperPaper Code: 133BMMaximum Marks: 75Time: 3 Hours

Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Part B consists of 5 Units. Answer any one full question from each unit.

Part A

Answer all questions in Part A. Each question carries marks as indicated.

125 marks
a

Differentiate between class and object.

2 marks

Answer

A class is a blueprint or template that defines the data members and methods common to all objects of a certain kind. An object is an instance of a class, representing a specific entity with actual values for the defined attributes.

b

What is meant by ad-hoc polymorphism?

3 marks

Answer

Ad-hoc polymorphism refers to the ability of a function or operator to behave differently depending on the types of arguments passed to it. In Java, this is primarily achieved through method overloading, where multiple methods share the same name but have different parameter lists.

c

How to define a package in Java?

2 marks

Answer

Sign in to view the complete answer paper.

d

Contrast between abstract class and interface.

3 marks

Answer

Sign in to view the complete answer paper.

e

Define exception.

2 marks

Answer

Sign in to view the complete answer paper.

f

Differentiate between a thread and a process.

3 marks

Answer

Sign in to view the complete answer paper.

g

Which methods of deque enable it to be used as a stack?

2 marks

Answer

Sign in to view the complete answer paper.

h

Make a comparison of List, array and ArrayList.

3 marks

Answer

Sign in to view the complete answer paper.

i

Give the AWT hierarchy.

2 marks

Answer

Sign in to view the complete answer paper.

j

What are the various classes used in creating a swing menu?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

Answer any one full question from each unit.

210 marks
a

What are the responsibilities of an agent?

5 marks

Answer

Sign in to view the complete answer paper.

b

What is the purpose of constructor in Java programming?

5 marks

Answer

Sign in to view the complete answer paper.

OR
3

Define inheritance. What are the benefits of inheritance? What costs are associated with inheritance? How to prevent a class from inheritance?

10 marks

Answer

Sign in to view the complete answer paper.

4

Write a program to demonstrate hierarchical and multiple inheritance using interfaces.

10 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Demonstrate ordinal( ) method of enum.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is type wrapper? What is the role of auto boxing?

5 marks

Answer

Sign in to view the complete answer paper.

6

Write a program to create three threads in your program and context switch among the threads using sleep functions.

10 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Write a program with nested try statements for handling exception.

5 marks

Answer

Sign in to view the complete answer paper.

b

How to create a user defined exception?

5 marks

Answer

Sign in to view the complete answer paper.

8

Write a program to read a file content and extract words using String Tokenizer class. Display the file if it contains the user query term/search key.

10 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Contrast sorted map and navigable map interfaces.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is the purpose of BitSet class? What is the functionality of the following functions of BitSet class: cardinality( ) , flip( ) and intersects( )

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Illustrate the use of Grid Bag layout.

5 marks

Answer

Sign in to view the complete answer paper.

b

What are the subclasses of JButton class of swing package?

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Create a simple applet to display a smiley picture using Graphics class methods.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a short note on delegation event model.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of OBJECT ORIENTED PROGRAMMING THROUGH JAVA from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE II Year I Semester, May/June - 2019, R16.

For the question paper without answers, switch to the Question Paper tab.

Other papers in OBJECT ORIENTED PROGRAMMING THROUGH JAVA

Loading Question Papers

Fetching data from database...