Home > Information Technology > Programming Languages > Basics of OOP
21 QuestionsLog inwatch on youtube 
00:00:00

ЁЯОБ Claim Rewards

ЁЯОБ Login to earn rewards !!!



21 uniquely designed questions just for you to evaluate your skills in Basics of OOP quiz. Are you ready to challenge yourself and explore more? Let's get started and see how much you can score out of 21.

Please feel free to report any corrections if you come across any inaccuracies or errors. Your feedback is valuable in maintaining the accuracy of our content.

Questions

1. What does OOP stand for?
Answer: Object-Oriented Programming
Explanation: OOPS is the abbreviation for Object-Oriented Programming.Report for correction
2. In OOPS; an object is an instance of what?
Answer: Class
Explanation: Object is an instance of a class that has its own state and access to all of the behaviour defined by its class.Report for correction
3. Which OOPS principle promotes the reusability of code by allowing a class to inherit the properties and methods of another class?
Answer: Inheritance
Explanation: Allowing a class to inherit the properties and methods of another class is called Inheritance.Report for correction
4. Which of the following is not a OOPS principle?
Answer: Function
Explanation: All others are part of OOPS principle.Report for correction
5. Hiding implementation details and exposing only necessary information is called?
Answer: EncapsulationReport for correction
6. Polymorphism allows objects of different classes to be treated as objects of a common _______?
Answer: Super class
Explanation: Polymorphism allows objects of different classes to be treated as objects of a common Super class.Report for correction
7. Which OOPS principle emphasizes bundling data and methods that operate on that data into a single unit?
Answer: Encapsulation
Explanation: Encapsulation emphasizes bundling data and methods that operate on that data into a single unit.Report for correction
8. In OOPS; the process of creating a new object from a class is called what?
Answer: InstantiationReport for correction
9. Which OOPS principle allows a class to have multiple methods with the same name but different parameters?
Answer: PolymorphismReport for correction
10. Which OOPS principle allows you to define a blueprint for creating objects with a set of attributes and behaviors?
Answer: AbstractionReport for correction
11. Which OOPS principle ensures that a class can be used as a blueprint to create objects; but cannot be instantiated itself?
Answer: Abstract classReport for correction
12. In OOPS; a method that has the same name as the class and is automatically called when an object is created is called as what?
Answer: ConstructorReport for correction
13. Which OOPS principle allows you to restrict access to certain parts of a class and its data?
Answer: EncapsulationReport for correction
14. In OOPS; a "has-a" relationship between classes is implemented using what?
Answer: CompositionReport for correction
15. Which keyword is used to indicate that a method in a subclass is intended to override a method in the superclass?
Answer: overrideReport for correction
16. Which OOPS concept allows you to define a contract that specifies a set of methods a class must implement?
Answer: InterfaceReport for correction
17. Which OOPS principle encourages the separation of a complex system into smaller; manageable classes and objects?
Answer: Abstraction
Explanation: Abstraction is a act of representing complex systems or ideas in a simplified way that can be easily understoodReport for correction
18. Which OOPS concept allows you to change the behavior of a class without modifying its source code?
Answer: PolymorphismReport for correction
19. In OOPS; a method that is defined in a superclass and can be overridden by its subclasses is called as what?
Answer: Runtime polymorphism
Explanation: We can override superclass methods so that meaningful implementation of superclass method can be defined in subclass. This is also known as runtime polymorphism.Report for correction
20. Which OOPS concept allows you to define default implementations for methods in an interface?
Answer: Default methodsReport for correction
21. Which keyword is used to make a class member accessible without needing to create an instance of the class?
Answer: staticReport for correction