0% found this document useful (0 votes)
8 views2 pages

Lab Programs For Internals - BCS306A

The document outlines lab assignment and viva questions for the Object-Oriented Programming with JAVA course at Don Bosco Institute of Technology for the academic year 2023-2024. It includes a list of programming tasks such as creating classes, handling exceptions, and implementing multi-threading. Additionally, it provides a set of viva questions covering key concepts in Java programming and object-oriented principles.

Uploaded by

Jashwanth R
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)
8 views2 pages

Lab Programs For Internals - BCS306A

The document outlines lab assignment and viva questions for the Object-Oriented Programming with JAVA course at Don Bosco Institute of Technology for the academic year 2023-2024. It includes a list of programming tasks such as creating classes, handling exceptions, and implementing multi-threading. Additionally, it provides a set of viva questions covering key concepts in Java programming and object-oriented principles.

Uploaded by

Jashwanth R
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

DON BOSCO INSTITUTE OF TECHNOLOGY

Kumbalagodu, Mysore Road, Bengaluru – 560074


Department of Artificial Intelligence & Data Science
LAB ASSIGNMENT QUESTIONS & VIVA QUESTIONS
Academic Year: -2023-2024(ODD semester)
Subject: Object-Oriented Programming with JAVA
Subject Code: BCS306A
Semester - III
Assignment Given Date: - 05-02- 2024
Sl. No Questions
1 Write a program to print the classes according to the marks
Marks >80, Print Distinction, Marks >60, Print First Class
Marks >50 , Print Second Class, Marks >35, Pass, Marks < 35, Fail
2 Write a program to add two matrices
3 Create a Stack of 10 elements
4 Create a class called employee with ID, Name, and Salary define a method to increase the salary
by 30 percent, and print the revised salary
5 Develop a JAVA program to create an abstract class Shape with abstract methods to
calculate Area() and Perimeter(). Create subclasses Circle and Triangle that extend the
Shape class and implement the respective methods to calculate the area and perimeter of
each shape.
6 Develop a program to create a class My Thread in this class a constructor, call the base
class constructor, using super, and start the thread. The run method of the class starts after
this. It can be observed that both the main thread and the created child thread are executed
concurrently.
7 Develop a JAVA program to raise an exception for Division By Zero using try, catch,
throw, and finally.
8 Develop a JAVA program to create an abstract class Shape with abstract methods to
calculate Area() and Perimeter(). Create subclasses Circle and Triangle that extend the
Shape class and implement the respective methods to calculate the area and perimeter of
each shape.
9 Develop a JAVA program to create a package named mypack and import & implement
it in a suitable class.
10 Write a program to illustrate the creation of threads using a runnable class. (start method
starts each of the newly created threads. Inside the run method is sleep() for suspending the
thread for 500 milliseconds).
11 Create your exception class if the bank balance is less than the withdrawal amount.
12 There are three passengers and one seat available. Write a Java multi-thread program to
demonstrate Synchronization techniques.
13 CCreate a class called Student with name, USN, and marks. Create three objects for the
rclass. Use ToString() method and hash code method to get the details of the objects
e
a
t
e
14 Create a variable int a= 5, concert it into an object of the wrapper class, and demonstrate
unboxing
15 Create a class called Box, Give the input values for length, breadth, and thickness
through the constructor, create a method to calculate the volume, and Use the same
constructor to calculate the volume of the cube
16 Demonstrate the implementation of interfaces

Sl. No Viva Questions


1 Public, static, void main
2 Abstract class
3 User interface
4 Inheritance and Demonstrate Inheritance
5 Abstract class
6 Super Keyword
7 final
8 Overriding Methods
9 Overloading Methods
10 Constructors and their use
11 Different access modifiers in Java
12 This keyword, Instance variables, class variables, local variables
13 Inheritance
14 Difference between overloading and overriding methods
15 OOPs principles
16 ToString() and Hash Code Methods
17 Exception Handling
18 Try catch
19 Multi-threading and importance
20 Different ways of creating threads
21 Wrapper classes in Java
22 Boxing, Auto Boxing and Unboxing

You might also like