JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III OBJECT ORIENTED PROGRAMMING THROUGH JAVA Previous Question Paper (August/September - 2021 - R18)

B.Tech | III | II | R18 | August/September - 2021

Answer PaperPaper Code: 156CCMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Explain features of object oriented programming languages.

7 marks

Answer

Object-Oriented Programming (OOP) is a paradigm based on the concept of objects which contain data and code. The core features are:

  • Classes and Objects: A class is a blueprint for objects. An object is an instance of a class that encapsulates state (fields) and behavior (methods).
  • Encapsulation: The mechanism of wrapping data and the methods that operate on the data into a single unit, restricting direct access to some components to prevent accidental modification.
  • Abstraction: Hiding complex implementation details and showing only the essential features of an object to the user.
  • Inheritance: A mechanism where a new class acquires the properties and behaviors of an existing class, promoting code reusability.
  • Polymorphism: The ability of an object or method to take on multiple forms, typically achieved through method overloading (compile-time) and method overriding (runtime).
b

Discuss the different levels of accesses protection available in Java with examples.

8 marks

Answer

Java provides four levels of access control to manage the visibility of classes, variables, and methods:

  • Private: The most restrictive level. Members are accessible only within the class they are declared in. Example:
    private int data;
  • Default (Package-private): If no modifier is specified, the member is accessible only within the same package. Example:
    void display() { ... }
  • Protected: Accessible within the same package and by subclasses in different packages. Example:
    protected void show() { ... }
  • Public: The least restrictive level. Members are accessible from any other class in the application. Example:
    public void execute() { ... }

These modifiers ensure data integrity and security by controlling the scope of access across the application hierarchy.

215 marks
a

Explain parameter passing mechanism in Java.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain briefly about String class and discuss various methods in string class with an example.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

What is package? Explain the process of defining and creating a package with suitable examples

8 marks

Answer

Sign in to view the complete answer paper.

b

What is interface? How to implement interface in Java?

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Write a Java program to implement method overriding.

8 marks

Answer

Sign in to view the complete answer paper.

b

What is thread? How to implement multithreading in Java.

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

How to implement user defined exceptions in Java with example?

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain generic methods in Java with examples.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Demonstrate creation of thread by implementing Runnable interface with a program.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the Key event Class and its methods in Java.

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Explain about Menu Bars and Menus class in AWT.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is Adapter classes? Explain Mouse Motion Adapter class with suitable Java program.

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

What is swing? Explain various swing components.

7 marks

Answer

Sign in to view the complete answer paper.

b

Develop an applet that receives an integer in one text filed and the compute the factorial value and return in another text filed, when the button named “Compute” is clicked.

8 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 EIE III II, August/September - 2021, R18.

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...