Object-Oriented Programming MCQs (Part-10)

What does Dependency Injection allow in OOP?

A Static code binding
B Decoupling components
C Object creation
D Dynamic method binding

Which of the following is the main benefit of using Dependency Injection in OOP?

A Reduced code reusability
B Increased memory usage
C Improved code modularity
D Faster object creation

Which of the following best describes Object-Oriented Scripting Languages?

A Handle system hardware directly
B Avoid inheritance
C Use classes and objects
D Use direct memory management

Which feature of OOP is most important for creating flexible and reusable code?

A Inheritance
B Abstraction
C Encapsulation
D Polymorphism

Which OOP concept allows for creating multiple methods with the same name but different signatures?

A Method overriding
B Abstraction
C Method Overloading
D Polymorphism

Which principle of OOP helps in hiding the internal workings of an object and exposing only the essential functionalities?

A Inheritance
B Abstraction
C Encapsulation
D Polymorphism

Which of the following is a common feature of OOP in Game Development?

A Avoidance of inheritance
B Focus on data-only structures
C Extensive use of objects and classes
D Use of procedural programming

What does Polymorphism allow in OOP?

A Data abstraction
B Same method, different implementations
C Multiple classes, one object
D Code reuse

What is the main purpose of using Interfaces in OOP?

A Define object behavior
B Store object data
C Simplify object initialization
D Prevent inheritance

What is an example of a Scripting Language that supports Object-Oriented Programming?

A Java
B Python
C C++
D Fortran

Which of the following is an example of Dependency Injection?

A Passing an object to a constructor
B Creating global variables
C Using static methods
D Instantiating objects within a method

Which OOP concept supports the concept of “one object having many forms”?

A Inheritance
B Encapsulation
C Abstraction
D Polymorphism

In OOP, which of the following is used to define behavior of an object?

A Class constructor
B Instance variable
C Inheritance
D Method or function

What is a key feature of Object-Oriented Scripting Languages in web development?

A Use of functional programming
B Lack of inheritance
C Easy integration with web APIs
D Static type system

What is the key benefit of using SOLID principles in OOP?

A Easier debugging
B Better system architecture
C Reduced code complexity
D Faster code execution