Object Oriented Programming Through Java July Aug 2023
Object Oriented Programming Through Java July Aug 2023
|''|'||||''|'''|||'|
Code No: R201212 R20 SET - 4
I B. Tech II Semester Regular/Supplementary Examinations, July/August-2023
OBJECT ORIENTED PROGRAMMING THROUGH JAVA
(Common to ECE, EIE, ECT)
Time: 3 hours Max. Marks: 70
Answer any five Questions one Question from Each Unit
All Questions Carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT - I
1. a) Explain the while and do-while loops with suitable example. [7M]
b) Write a Java program to find the sum of digits of a given number. [7M]
(OR)
2. a) Define Methods and objects. Explain with example Java program. [7M]
b) What is a Constructor? What is its requirement in programming? Explain with [7M]
program.
UNIT-II
3. a) Explain the process of defining and creating a package with suitable examples. [7M]
b) Compare and Contrast between interface and abstract class. [7M]
(OR)
4. Define inheritance. What are the benefits of inheritance? What costs are associated [14M]
with inheritance? How to prevent a class from inheritance?
UNIT-III
5. a) List the different types of Layout managers ,explain any 2 with suitable examples [7M]
b) What are the various components of Swing? Explain. [7M]
(OR)
6. a) What is an Applet? Explain the life cycle of Applet with a neat sketch. [7M]
b) Create a simple Applet to display a smiley picture using Graphics class methods. [7M]
UNIT-IV
7. a) Explain the Event driven model. Write a Java program for it. [7M]
b) Distinguish between Byte Stream Classes and Character Stream Classes. [7M]
(OR)
8. a) Write a program to create a frame window that responds to key strokes. [7M]
b) Discuss about the Random Access Files with example. [7M]
UNIT-V
9. a) What are the different ways to handle exceptions? Explain. [7M]
b) Write a program that creates two threads. Fist thread prints the numbers from 1 to [7M]
100 and the other thread prints the numbers from 100 to 1
(OR)
10 a) Write a program to create four threads using Runnable interface. [7M]
b) What are the common algorithms implemented in Collections Framework? Discuss. [7M]
*****
1 of 1
|''|'||||''|'''|||'|