Object-Oriented Programming MCQs (Part-12)

What does Dynamic Method Dispatch in OOP?

A Overloading method signatures
B Calling methods based on object type
C Binding methods to classes
D Resolving methods at compile time

Which of the following best describes Event-Driven Programming in OOP?

A Methods are called sequentially
B Memory management is handled automatically
C Program flow depends on user events
D Code executes in a specific order

Which OOP concept allows an object’s method to be determined at runtime?

A Dynamic Method Dispatch
B Static Binding
C Method Overriding
D Method Overloading

What is the main focus of Secure Coding in OOP?

A Improving code readability
B Enhancing system performance
C Preventing security vulnerabilities
D Reducing code size

Which technique is commonly used to handle errors securely in OOP?

A Polymorphism
B Exception Handling
C Memory Management
D Dynamic Binding

Which concept in OOP is responsible for ensuring data is protected from unauthorized access?

A Polymorphism
B Inheritance
C Encapsulation
D Abstraction

In event-driven programming, what triggers a system response?

A File input/output operations
B User or system-generated events
C Object instantiation
D System resource allocation

Which of the following is an example of Secure Coding in OOP?

A Using prepared statements for database queries
B Inheriting from abstract classes
C Dynamic object creation
D Using method overloading

Which technique is used to ensure that an object’s state cannot be modified directly?

A Abstraction
B Polymorphism
C Encapsulation
D Inheritance

What is the primary use of Event Handlers in OOP?

A Optimize code performance
B Respond to events triggered by the user or system
C Store data from user input
D Manage error handling

Which OOP concept allows classes to act as templates for creating objects?

A Polymorphism
B Abstraction
C Inheritance
D Classes

What is the purpose of Event-Driven Programming in GUI development?

A Handle multiple threads
B Handle system memory
C Control hardware interaction
D Respond to user inputs

Which of the following is a common practice in Secure Coding?

A Avoid method overloading
B Validate user input
C Limit the use of classes
D Minimize code reusability

What is Dynamic Method Dispatch important for in OOP?

A Runtime polymorphism
B Memory optimization
C Error handling
D Code efficiency

What is the role of Encapsulation in Secure Coding in OOP?

A Increases method complexity
B Reduces class inheritance
C Protects object data
D Improves runtime performance