Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

PART-A (10x2 20 Marks) 1. List Any Four Java Doc Comments

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

MODEL EXAM

CS8392-OBJECT ORIENTED PROGRAMMING


DEG/DEPT : BE/CSE DATE: 19/10/2019
YEAR/SEM : II / III Maximum Marks: 100

PART- A (10x2=20 Marks)


1. List any four Java doc comments.
2. What is meant by Java package with example and how to import a
single package?
3. Differentiate between class and interface
4. Write a program change the lower case to upper case.
5. Differentiate between exception and error.
6. What is use of throws keyword in exception handling?
7.Define thread and list the lifecycle stages of thread.
8.What are the advantages of threads?
9.Give short note on draw oval method frames.
10.Define canvas class in Java.
PART- B (5x13= 65Marks)

11.(a) (i).Explain about constructors in Java with example.


(ii). Explain about control structures available in Java
with example.
(OR)
(b)(i) Write a program that gets the student detail from the user
a) Name, Roll No, Marks obtained from 3 subjects as input
b) Computer the total and average
c) Display their grade based on average (O, A,B,C,D,F)

(ii) .What is static method and static variable? How static method and
variables are defined? Give example.

12.(a)(i)Explain in details about types of Inheritance supported by Java


(ii)Write a program to that implements following Inheritance
concepts.
Vehicle

Bike Car

Economic Sports
Bike Bike
(OR)
(b) (i) Explain about Array list class and its methods in Java.
(ii) What is an interface? Write a Java program to illustrate the use
of interface.

13.(a)(i) Explain about streams in Input and output operations


(ii)Write a program to read contents from one file and convert all the
Words into upper case and write it into another file.
(OR)
(b)(i)Write a detailed note for Exception handling in Java
With an example.
(ii)Explain about user defined exception with an example.
14.(a)(i)Explain in detail about generic class and methods.
(ii)Explain about thread groups with an example.
(OR)
(b)(i) Explain about synchronized methods and blocks with example.
(ii)Write a program that helps to find all sums of all elements in
array using generics.
15.(a)(i) What is layout management? What is the function of layout
management? What is the process of setting the layout manager?
(ii)State and explain the basics of AWT event handling in detail.
(OR)
(b)(i)Classify the classes under 2D shapes and explain the swing
components in details.
(ii) Write a program to use set bounds ( ) methods and create a program
use of border layouts.

PART- C (1x15= 15Marks)


16.Write a program for unit conversion based on following requirement
a) Miles to Kilometers
b) Celsius to Fahrenheit
c) Hours to second and vice versa

You might also like