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)
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.
Differentiate between class and object.
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.
What is meant by ad-hoc polymorphism?
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.
How to define a package in Java?
Answer
Sign in to view the complete answer paper.
Contrast between abstract class and interface.
Answer
Sign in to view the complete answer paper.
Define exception.
Answer
Sign in to view the complete answer paper.
Differentiate between a thread and a process.
Answer
Sign in to view the complete answer paper.
Which methods of deque enable it to be used as a stack?
Answer
Sign in to view the complete answer paper.
Make a comparison of List, array and ArrayList.
Answer
Sign in to view the complete answer paper.
Give the AWT hierarchy.
Answer
Sign in to view the complete answer paper.
What are the various classes used in creating a swing menu?
Answer
Sign in to view the complete answer paper.
Part B
Answer any one full question from each unit.
What are the responsibilities of an agent?
Answer
Sign in to view the complete answer paper.
What is the purpose of constructor in Java programming?
Answer
Sign in to view the complete answer paper.
Define inheritance. What are the benefits of inheritance? What costs are associated with inheritance? How to prevent a class from inheritance?
Answer
Sign in to view the complete answer paper.
Write a program to demonstrate hierarchical and multiple inheritance using interfaces.
Answer
Sign in to view the complete answer paper.
Demonstrate ordinal( ) method of enum.
Answer
Sign in to view the complete answer paper.
What is type wrapper? What is the role of auto boxing?
Answer
Sign in to view the complete answer paper.
Write a program to create three threads in your program and context switch among the threads using sleep functions.
Answer
Sign in to view the complete answer paper.
Write a program with nested try statements for handling exception.
Answer
Sign in to view the complete answer paper.
How to create a user defined exception?
Answer
Sign in to view the complete answer paper.
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.
Answer
Sign in to view the complete answer paper.
Contrast sorted map and navigable map interfaces.
Answer
Sign in to view the complete answer paper.
What is the purpose of BitSet class? What is the functionality of the following functions of BitSet class: cardinality( ) , flip( ) and intersects( )
Answer
Sign in to view the complete answer paper.
Illustrate the use of Grid Bag layout.
Answer
Sign in to view the complete answer paper.
What are the subclasses of JButton class of swing package?
Answer
Sign in to view the complete answer paper.
Create a simple applet to display a smiley picture using Graphics class methods.
Answer
Sign in to view the complete answer paper.
Write a short note on delegation event model.
Answer
Sign in to view the complete answer paper.