Skip to content

BCS306A · 2022 · CSE · Semester 3

Object Oriented Programming with Java

Back to subjects

Automated PYQ shortlist · Academic review pending. Questions are displayed from OCR. Some formulas and figures may need review.

Review status & sources

Similar question wording is grouped and ranked by the number of distinct exam sessions. Groups with the same count are ordered by their extracted text. Some subjects have only one session. Paper references show the PDF page and extracted question number when available.

Module 1

Develop a Java program to add. two. matrices using" command"line «irgument."

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q2b

Discuss the different data types supported by Java along with the default values and literals. Develop a Java program to convert Celsius temperature to Fahrenheit.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q1a

Explain the syntax of declaration of 2D arrays in Java

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q2c
Show 2 Backup Questions

Justify the statement "Compile once and run anywhere" in Java.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q1c

List the various operators supported by Java. Illustrate the working of> and >>> operators with an example.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q2a

Module 2

Explain method overloading in Java with examples. Design a stack class to hold maximum of N numbers with a constructor, push, POP and Display methods. Develop Java main method to illustrate stack operations.

2 exam sessions
  • June-July-2024 · PDF page 1 · Q3
  • June-July-2025 · PDF page 1 · Q4

Build a Java program to create an interface Resizable with method resize 10 (int radius) that allow an object to be resized. Create a class circle that implements resizable interface and implements the resize method.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q4b

Develop a Java program to create a class called "Employeeiwhich contains name', designation", "empid' and 'basic salary' as instance variables and read () and write ( ) as methods. Using this class, read and write five employee information from main () method.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q4b
Show 2 Backup Questions

Illustrate the usage of super keyword in Java with suitable example. Also explain the dynamic method dispatch. • 10

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q4a

Interpret with an example, types of constructions. Q:5 Module - 3

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q4c

Module 3

Build a Java program to create an interface Resizable with method resize (int radius) that allow an object to be resized. Create a class circle that 25 implements resizable interface and implements the resize method

OCR transcription · Wording, symbols, or figures may be incomplete.

2 exam sessions
  • Dec-2023-Jan-2024 · PDF page 1 · Q5b
  • June-July-2024 · PDF page 1 · Q5b

Compare and contrast method overloading and method overriding with suitable example. ! of 2 4 Define inheritance and list the different types of inheritance in Java. 8 Build a Java program to create a class named 'Shape'. Create 3 sub classes

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 1 · Q6a

namely circle, triangle and square ; each class has 2 methods named draw ( ) and erase ( ). Demonstrate polymorphism concepts by developing suitable methods and main program. Module - 4 10 L2 Examine the various levels of access protections available for packages and Q:7 a. their implications with suitable examples. 10 Build a Java program for a banking application to throw an exception, where a person tries to withdraw the amount even though he/she has lesser than minimum balance (Create a custom exception)

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q6c
Show 2 Backup Questions

10 Define Exception. Explain Exception handling mechanism provided in Java Q:8 a. along with syntax and example. 10 Build a Java program to create a package "balance" containing Account Class with displayBalance () method and import this package in another program to access method of Account Class.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q6

Briefly explain implementation of interface by taking suitable example.

1 exam session
  • June-July-2025 · PDF page 1 · Q6b

Module 4

Define exception and explain the exception handling mechanism with an example.

2 exam sessions
  • June-July-2024 · PDF page 2 · Q7b
  • Dec-2024-Jan-2025 · PDF page 2 · Q7b

What is package? How to create and import packages in Java.

2 exam sessions
  • June-July-2025 · PDF page 1 · Q7
  • June-July-2024 · PDF page 2 · Q8

21. Define a package. Explain how to create user defined package with example.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 2 · Q7
Show 2 Backup Questions

Compare throw and throws keyword by providing suitable example 10 L2 program.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 2 · Q8

Develop a Java program to raise a custom exception for division by zero using try, catch, throw and finally.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2024-Jan-2025 · PDF page 2 · Q7c

Module 5

constructor in this class's constructor using super and start the thread. The run method of the class starts after this. It can be observed that both main thread and created child thread are executed concurrently.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q10c

Develop a Java program to create a class myThread. Call the base class

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q10b

Explain Autoboxing/Unboxing that occurs in expressions and operators.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q10a
Show 2 Backup Questions

How synchronization can be achieved between threads in Java? Explain with an example. Develop a Java program for automatic conversion of wrapper class type

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q9a

Develop a Java program for automatic conversion of wrapper class type 8 into corresponding primitive type that demonstrates unboxing.

OCR transcription · Wording, symbols, or figures may be incomplete.

1 exam session
  • Dec-2023-Jan-2024 · PDF page 2 · Q9c