0% found this document useful (0 votes)
41 views

Model Question Paper 2

Uploaded by

mohammeduzair044
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Model Question Paper 2

Uploaded by

mohammeduzair044
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Model Question Paper-II

Object Oriented Programming with Java (BCS306A)

Time: 3 Hours Max. Marks: 100

Note: Answer any FIVE full questions, choosing one full question from each module.

Module-1

1. a. List out and explain the different lexical elements used in Java with examples.
(10 Marks)

b. Explain the different Java’s selection statements with syntax and examples.
(10 Marks)

OR

2. a. List out and explain the different operators used in Java with examples. (10 Marks)

b. Explain the different jump statements used in Java with examples. (10 Marks)

Module-2

3. a. What is constructor? Explain parameterized constructor with examples. (10 Marks)

b. A class called Employee, which models an employee with an ID, name and salary. The
method raiseSalary (percent) increases the salary by the given percentage. Develop the
Employee class and suitable main method for demonstration. (10 marks)

OR

4. a. What is method overloading? Explain with example program. (10 Marks)

b. Explain the argument passing techniques with example programs. (10 Marks)

Module-3

5. a. How to create multilevel hierarchy? Explain with suitable example. (10 Marks)

b. What is dynamic method dispatch? Explain with program example. (10 Marks)

OR
6. a. Develop a JAVA program to create a class named shape. Create three sub classes namely:
circle, triangle and square, each class has two member functions named draw () and erase ().
Demonstrate polymorphism concepts by developing suitable methods, defining member data and
main program. (10 Marks)

b. What is abstract class? How create abstract class in Java? Explain with example. (10 Marks)

Module-4

7. a. What is package? Explain the various levels of access protections available for packages
with program example. (10 Marks)

b. Define Exception. Write a program which contains one method which will throw
IllegalAccessException and use proper exception handlers so that exception should be printed in
the calling function. (10 Marks)
OR

8. a. How to use nested try statement? Explain with example. (10 Marks)

b. List out and explain Java’s built-in exception. (6 Marks)

c. Write a Java program to demonstrate how to create and throws an exception. (4 Marks)

Module-5

9. a. Define multithreading. Construct a Java program to create to create multiple threads in Java
by implementing runnable interface. (10 Marks)

b. Explain the use of following methods with examples. (10 Marks)

i. wait ( ) ii. notify( ) iii. notifyAll( )

OR

10. a. What is a deadlock? Write a Java program to demonstrate the concept of deadlock.
(10 Marks)

b. What are the differences between suspending and stopping the threads? (5 Marks)

c. Explain thread priorities with examples. (5 Marks)

You might also like