2026 QUESTIONS WITH ANSWERS GRADED
A+
◉ Write the basic concepts of OOPS. Answer: Abstraction,
Encapsulation, inheritance, and polymorphism
◉ What is a class? Answer: a blueprint from which objects are created.
◉ What is an object? Answer: An instance created using a class
◉ What is Encapsulation? Answer: Encapsulation is an attribute of an
object, and it contains all data which is hidden. That hidden data can be
restricted to the members of that class.
Levels are Public,Protected, Private, and Default
◉ What is Inheritance? Answer: Inheritance is a concept where one class
shares the structure and behavior defined in another class
, ◉ What is in an interface? Answer: An interface is a collection of
abstract method. If the class implements an inheritance, and then thereby
inherits all the abstract methods of an interface.
◉ What is a package? Answer: A package is a namespace that organizes
a set of related classes and interfaces. Conceptually you can think of
packages as being similar to different folders on your computer.
◉ How to identify and design a Class? Answer: You can Identify them
in five principles. SRP, OCP, LSP, DIP, ISP.
◉ What is Association ? Answer: It allows one object instance to cause
another to perform an action on its behalf.
◉ What is the difference between Association, Aggregation, and
Composition? Answer: Aggregation is a weak type of Association with
partial ownership
Composition is a strong type of Association with full ownership.
◉ What is Abstraction and Generalization? Answer: Abstraction is an
emphasis on the idea, qualities and properties rather than the particulars
(a suppression of detail).
Generalization is a broadening of application to encompass a larger
domain of objects of the same or different type.