Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
14 views

Object Oriented Programming With Java Feb 2022

fcsdcds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Object Oriented Programming With Java Feb 2022

fcsdcds
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Code No: R2021422 R20 SET - 1

II B. Tech I Semester Regular Examinations, Feb/March - 2022


OBJECT ORIENTED PROGRAMMING WITH JAVA
(Com to CSE (AIML), AI, DS, CSE (AIDS), AIDS, AIML)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~

1 a) Explain the features of Object-Oriented Programming Languages in detail? [7M]


b) Describe type promotion rules of Java and write an example program. [7M]

Or
2 a) What are the drawbacks of procedural languages? Explain the need of object- [7M]
oriented programming with suitable program.
b) Explain various control structures used in JAVA with suitable examples. [7M]

3 a) Write a Java program to demonstrate method overloading using varargs? [5M]


b) With suitable code segments illustrate various uses of ‘final’ keyword. [5M]
c) Discuss about anonymous inner classes and nested classes. [4M]

Or
4 a) What is a constructor? What is its requirement in programming? Explain with [7M]
program.
b) Write about class, object, methods, constructor and destructor. [7M]

5 a) What do you understand by super key word? Write use of super key word. [3M]
b) Differentiate between Interface and Abstract class. When Interface is preferred [4M]
over Abstract class.
c) Write an Abstract class named Person and its two subclasses named Student and [7M]
Employee.
A person name, address, phone number and email address. A student has
enrollment, course. An employee has an office, salary and designation. Define
constructors and methods for input and display for both classes. Write a main
program to give demonstration of all.
Or
6 a) Define inheritance with diagrammatic illustration and java programs to illustrate [7M]
the different types of inheritance with an example.
b) Write the Java program to create anonymous objects using an Interface. [7M]

7 a) Describe the process of importing and accessing a package with suitable [7M]
examples.
b) Write the differences between the following classes Date, Calendar and [7M]
Gregorian Calendar and usage of time package.
Or

1 of 2

|''|''|||''|'''|||'|
Code No: R2021422 R20 SET - 1

8 a) Create a Car class in Package p1 which has its private member variables like [7M]
booleancentral_locking, byterain_sensors, Boolean automatic_headlight and has
abstract methods defined for getting and setting the values for these variables.
Create a concrete class implementation called as Gallardo in package p2, which
extends Car class and give the implementation for the abstract methods.
Create a main class to display the values of these variables using Gallardo object
and Car’s reference.
b) Differentiate between an Exception and an Error? How are Runtime exceptions [7M]
handled? Explain the syntax?

9 a) Create a Bank Application program to illustrate the use of multithreading. [7M]


b) Explain the difference between String, String Buffer and String Builder classes? [7M]

Or
10 a) Assuming that there are a list of 10 student objects, where each student object [7M]
has the following member variable {Name, roll no, attd%, CGPA}. You have to
write the logic for displaying the list of students whose attd% is less than 65%
using a JTable in increasing order of attendance
b) Write a JDBC program to search for an attribute in a table and display the entire [7M]
tuple to the user. For example, display all the details of the student given his/her
roll number.

2 of 2

|''|''|||''|'''|||'|

You might also like