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

OOTS Unit1 Assignment1 2025-2026

Uploaded by

imshivam246
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)
43 views2 pages

OOTS Unit1 Assignment1 2025-2026

Uploaded by

imshivam246
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

OOTS using (BCSE0352) SESSION: 2025-26

UNIT-I CLASS/SEM: B.Tech. (AIML) III Sem

Assignment Given Date: 30/08/2025 Maximum Points: 10


Assignment Submission Date: 05/09/2025 Assignment - 1
Faculty Name: Dr. Ghazala Sultan Faculty Mail Id: [email protected]

Bloom’s
All Questions are Compulsory: CO’s
Level

Q1. Which of the following is an example of abstraction in Java?


a) Method overloading
b) Hiding implementation using abstract classes and interfaces CO1 K2
c) Reusing code through inheritance
d) Binding variables inside a class

2. Which control statement is used to exit a loop prematurely in


Java?
a) continue
CO1 K2
b) break
c) return
d) exit()

3. Which of the following statements about the this keyword is


correct?
a) It refers to the parent class object
CO1 K2
b) It refers to the current class object
c) It is used only in static methods
d) It can be used to call the garbage collector

Q4. Explain the four pillars of OOP with suitable real-life examples. CO1 K2

Q5. Define Class Diagram and Object Diagram in UML.


CO1 K2
Differentiate between the two with an example.
Q6. Write short notes on the following (any two):
a) this keyword
CO1 K2
b) Abstract Class vs Interface
c) JVM Architecture and its components

Q7. Write a Java program to find the largest of three numbers using
CO1 K2
an if-else decision statement.

Q8. Write a Java program using a for loop to print all even numbers
CO1 K2
from 1 to 50.

Q9.Create a Java class Student with attributes (name, rollno, marks).


Define a constructor to initialize these attributes and a method to CO1 K2
display student details. Demonstrate by creating at least two objects.

Q10. Write a Java program that demonstrates inheritance by creating


a base class Vehicle and a derived class Car. Show the use of super CO1 K2
keyword in your program.

You might also like