Computer

Object-Oriented Analysis & Design (OOAD) MCQs with Answers

What is the primary goal of Object-Oriented Analysis and Design (OOAD)?
a) To develop software using procedural programming
b) To create a system based on objects and their interactions
c) To eliminate the need for testing
d) To focus only on database design

Answer
b) To create a system based on objects and their interactions

Which of the following is NOT a characteristic of Object-Oriented Programming?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) Linear Execution

Answer
d) Linear Execution

Which phase of OOAD focuses on identifying objects and their relationships?
a) Implementation
b) Object-Oriented Analysis
c) Testing
d) Deployment

Answer
b) Object-Oriented Analysis

Which UML diagram is used to represent a class structure?
a) Sequence Diagram
b) Activity Diagram
c) Class Diagram
d) State Diagram

Answer
c) Class Diagram

Which principle of OOP allows a subclass to inherit behavior from a parent class?
a) Polymorphism
b) Encapsulation
c) Inheritance
d) Abstraction

Answer
c) Inheritance

What is the purpose of encapsulation in OOP?
a) To allow access to private data
b) To hide implementation details and protect data
c) To make all class members public
d) To avoid code reusability

Answer
b) To hide implementation details and protect data

Which relationship in OOAD represents “is-a” inheritance?
a) Association
b) Aggregation
c) Composition
d) Generalization

Answer
d) Generalization

Which UML diagram shows the flow of activities in a system?
a) Class Diagram
b) Sequence Diagram
c) Activity Diagram
d) Object Diagram

Answer
c) Activity Diagram

What is polymorphism in Object-Oriented Programming?
a) The ability of different classes to have the same attributes
b) The ability of a function or method to take multiple forms
c) The ability to create multiple copies of an object
d) The ability to store multiple objects in an array

Answer
b) The ability of a function or method to take multiple forms

Which term describes the process of designing a system using objects?
a) Structured Programming
b) Object-Oriented Design
c) Functional Programming
d) System Testing

Answer
b) Object-Oriented Design

Which UML diagram represents object interactions over time?
a) Sequence Diagram
b) Class Diagram
c) Activity Diagram
d) Deployment Diagram

Answer
a) Sequence Diagram

Which design principle promotes programming to an interface rather than an implementation?
a) Single Responsibility Principle
b) Open-Closed Principle
c) Dependency Inversion Principle
d) Law of Demeter

Answer
c) Dependency Inversion Principle

Which UML diagram represents different states of an object?
a) Use Case Diagram
b) State Diagram
c) Sequence Diagram
d) Class Diagram

Answer
b) State Diagram

Which of the following is NOT an advantage of Object-Oriented Design?
a) Code Reusability
b) Better Maintainability
c) Increased Complexity
d) Modularity

Answer
c) Increased Complexity

Which relationship in OOAD represents “has-a” or whole-part relationship?
a) Association
b) Generalization
c) Aggregation
d) Dependency

Answer
c) Aggregation

Which principle states that a class should only have one reason to change?
a) Open-Closed Principle
b) Single Responsibility Principle
c) Liskov Substitution Principle
d) Interface Segregation Principle

Answer
b) Single Responsibility Principle

Which of the following best describes abstraction in OOP?
a) Hiding unnecessary details and showing only relevant features
b) Allowing multiple methods to have the same name
c) Creating multiple instances of an object
d) Allowing direct access to private variables

Answer
a) Hiding unnecessary details and showing only relevant features

Which design pattern ensures that only one instance of a class exists?
a) Factory Pattern
b) Singleton Pattern
c) Observer Pattern
d) Decorator Pattern

Answer
b) Singleton Pattern

Which UML diagram is used to represent system components and their dependencies?
a) Component Diagram
b) Sequence Diagram
c) Activity Diagram
d) Class Diagram

Answer
a) Component Diagram

What is the purpose of an interface in OOP?
a) To implement a class directly
b) To define a contract without implementation
c) To create a subclass
d) To allow multiple inheritance

Answer
b) To define a contract without implementation

Which OOP concept allows a subclass to override a method in its parent class?
a) Encapsulation
b) Method Overloading
c) Method Overriding
d) Abstraction

Answer
c) Method Overriding

Which UML diagram is used to represent user interactions with a system?
a) Class Diagram
b) State Diagram
c) Use Case Diagram
d) Component Diagram

Answer
c) Use Case Diagram

Which design principle promotes the extension of a class’s functionality without modifying it?
a) Open-Closed Principle
b) Single Responsibility Principle
c) Interface Segregation Principle
d) Dependency Inversion Principle

Answer
a) Open-Closed Principle

Which pattern allows an object to change its behavior dynamically?
a) Singleton Pattern
b) State Pattern
c) Factory Pattern
d) Prototype Pattern

Answer
b) State Pattern

Which of the following is NOT a type of UML relationship?
a) Association
b) Aggregation
c) Polymorphism
d) Dependency

Answer
c) Polymorphism

Which design pattern is used to create families of related objects without specifying their concrete classes?
a) Singleton Pattern
b) Factory Pattern
c) Abstract Factory Pattern
d) Adapter Pattern

Answer
c) Abstract Factory Pattern

Which UML diagram is used to show the physical deployment of software components?
a) Deployment Diagram
b) Activity Diagram
c) Sequence Diagram
d) Class Diagram

Answer
a) Deployment Diagram

Which principle states that subclasses should be replaceable for their parent classes without breaking the application?
a) Open-Closed Principle
b) Liskov Substitution Principle
c) Dependency Inversion Principle
d) Interface Segregation Principle

Answer
b) Liskov Substitution Principle

Which UML diagram is best suited for modeling object interactions within a time sequence?
a) Class Diagram
b) Sequence Diagram
c) Activity Diagram
d) Use Case Diagram

Answer
b) Sequence Diagram

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button