0% found this document useful (0 votes)
14 views3 pages

Mid Term 1 Question Bank Oop..

Uploaded by

kushal
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)
14 views3 pages

Mid Term 1 Question Bank Oop..

Uploaded by

kushal
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/ 3

PRIYADARSHINI COLLEGE OF ENGINEERING, NAGPUR

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA SCIENCE


Mid Term -l Question Bank(2024-25)
SEMESTER: IIIrd SECTION: A&B
SUBJECT: Object Oriented Programming SUBJECT CODE: 24UAI302T

Que. Question COs BL


No.
Unit 1
1. What is Constructor. Write any one program based on Constructor. CO1 2

2. Explain in brief about JVM? CO1 2


3. Explain the following operators used in java with suitable example. i) Logical CO1 2
operators. ii) Bitwise operators. iii) Relational operators. iv) Ternary operators.
4. Differentiate between Class and Object with syntax
5. Discuss Constructor and Destructor with suitable example. CO1 3
6. Explain different Primitive data types in JAVA. CO1 2
7. What is Array? Also explain array index and what types are valid for Array CO1 2
indexes?
8. Explain Access specifiers used in Java. CO1 2
9. Write any one Java program using switch case statement. CO1 2
10. Write a program to sum first n even numbers using a while loop. CO1 2
Unit 2
11. Describe the following: CO2 2
a) super
b) this
c) final keyword.
12. What is inheritance? Explain Single and Multilevel inheritance with suitable CO2 2
example.
13. Describe method overloading with a suitable example ? CO2 1

14. Explain Why multiple inheritance is not supported in java? CO2 2

15. Write a short notes on Polymorphism with suitable example. CO2 2


16. What is Dynamic method Dispatch? Explain with suitable example? CO2 1
17. Describe method overriding with a suitable example ? CO2 2
18. Discuss the different access modifiers in Java? CO2 2
19. Describe Abstract class and Abstract method with example. CO2 2
20. Write a Java program to create a class called Vehicle with a method called CO2 2
drive(). Create a subclass called Car that overrides the drive() method to print
"Repairing a car".
Unit 3
21. Define Interface and Explain any one program to implement interface inside CO3 2
the class?
22. Describe Multiple inheritance in java by interface with suitable example? CO3 2
23. Define Packages. How to create a package in Java? CO3 2

24. Discuss the three ways to access package from outside the package? or CO3 2
Explain its types with suitable example.
25. Differentiate between Interface and Abstract Class in java. CO3 3
26. Explain how to extends an interface into another another interface with CO3 3
example?
27. Write a Java program to create a Animal interface with a method called bark() CO3 3
that takes no arguments and returns void. Create a Dog class that implements
Animal and overrides speak() to print "Dog is barking".
Ans: public interface Animal
{ void bark();
}
public class Dog implements Animal
{
@Override
public void bark()
{
System.out.println("Dog is barking!");
}
}
public class Main
{
public static void main(String[] args)
{
Dog dog = new Dog();
dog.bark();
}
}

28. What is the difference between an interface and class. With the help of suitable CO3 2
java program explain the purpose of interfaces in java.

You might also like