Quiz: Object-Oriented Analysis and Design (OOAD)
Course: CSIS 312 - Advanced Object-Oriented
Programming
Score for this quiz: 50 out of 50
LIBERTY UNIVERSITY
Question 1 2.5/2.5 pts
In OOP, what is encapsulation?
Answer: Bundling data and methods within a single unit
(class).
Question 2 2.5/2.5 pts
What does OOP stand for?
Answer: Object-Oriented Programming.
Question 3 2.5/2.5 pts
Which keyword is used to define a class in most programming
languages?
Answer: class.
Question 4 2.5/2.5 pts
What is inheritance in OOP?
Answer: Reusing code by creating a new class from an
existing class.
Question 5 2.5/2.5 pts
What is polymorphism?
Answer: The ability to treat objects of different classes as
objects of a common superclass.
Question 6 2.5/2.5 pts
What principle allows methods to be overridden in subclasses?
Answer: Polymorphism.
Question 7 2.5/2.5 pts
What does encapsulation hide?
Answer: Implementation details.
Question 8 2.5/2.5 pts
What is abstraction?
Answer: Hiding complex implementation details and
showing only essential features.
Question 9 2.5/2.5 pts
Which concept allows a class to inherit methods and attributes
from another class?
Answer: Inheritance.
Question 10 2.5/2.5 pts
Which keyword is used to create an instance of a class?
Answer: new.
Question 11 2.5/2.5 pts
What is a constructor?
Answer: A special method that initializes objects.
Question 12 2.5/2.5 pts
What does a destructor do?
Answer: Cleans up resources before an object is
destroyed.
Question 13 2.5/2.5 pts
What is method overloading?
Answer: Defining multiple methods with the same name
but different parameters.
Question 14 2.5/2.5 pts
What is method overriding?
Answer: Providing a new implementation for a method
inherited from a superclass.
Question 15 2.5/2.5 pts
Which access modifier restricts access to a class's members to
within the same class?
Answer: private.
Question 16 2.5/2.5 pts
Which access modifier allows access from any other class?
Answer: public.
Question 17 2.5/2.5 pts
What is an abstract class?
Answer: A class that cannot be instantiated and may
contain abstract methods.
Question 18 2.5/2.5 pts
What is an interface in OOP?
Answer: A contract that defines methods without
implementing them.
Question 19 2.5/2.5 pts
Which concept helps in hiding complexity by showing only the
necessary details?
Answer: Abstraction.
Question 20 2.5/2.5 pts
What is the purpose of a getter method?
Answer: To retrieve the value of a private attribute.
Question 21 2.5/2.5 pts
What is the purpose of a setter method?
Answer: To modify the value of a private attribute.
Question 22 2.5/2.5 pts
What does the term 'composition' refer to in OOP?
Answer: Creating complex types by combining objects of
other classes.
Question 23 2.5/2.5 pts
What does 'aggregation' mean in OOP?
Answer: A special form of association where one class is a
part of another class.
Question 24 2.5/2.5 pts
What is a derived class?
Answer: A class that inherits from another class (base
class).
Question 25 2.5/2.5 pts
What is a base class?
Answer: A class that is inherited by another class.
Question 26 2.5/2.5 pts
What does 'loose coupling' refer to in OOP?
Answer: Reducing dependencies between classes.
Question 27 2.5/2.5 pts
What is 'tight coupling'?
Answer: A scenario where classes are highly dependent on
each other.
Question 28 2.5/2.5 pts
What is a class in OOP?
Answer: A blueprint for creating objects.
Question 29 2.5/2.5 pts
What is an object in OOP?
Answer: An instance of a class.
Question 30 2.5/2.5 pts
What is the purpose of the 'this' keyword?
Answer: To refer to the current instance of a class.
Question 1 2.5/2.5 pts
In OOP, what is encapsulation?
A) The ability to extend a class
B) The concept of bundling data and methods within a single unit
(class)
C) The inheritance of properties from a parent class
D) The ability to override methods in a subclass
Answer: B) The concept of bundling data and methods
within a single unit (class)
Question 2 2.5/2.5 pts
What does OOP stand for?
A) Object-Oriented Programming
B) Object-Oriented Procedure
C) Object-Oriented Processing
D) Operational Object Programming
Answer: A) Object-Oriented Programming
Question 3 2.5/2.5 pts
Which keyword is used to define a class in most programming
languages?
A) create
B) define
C) class
D) new
Answer: C) class
Question 4 2.5/2.5 pts
What is inheritance in OOP?
A) Reusing code by creating a new class from an existing class
B) Hiding data within a class
C) Defining multiple methods with the same name
D) Combining multiple classes into one
Answer: A) Reusing code by creating a new class from an
existing class
Question 5 2.5/2.5 pts
What is polymorphism?
A) The ability to treat objects of different classes as objects of a
common superclass
B) The concept of hiding data within a class
C) The use of multiple constructors in a class
D) The process of creating new classes from existing ones
Answer: A) The ability to treat objects of different classes
as objects of a common superclass
Question 6 2.5/2.5 pts
What principle allows methods to be overridden in subclasses?
A) Encapsulation
B) Polymorphism
C) Inheritance
D) Abstraction
Answer: B) Polymorphism
Question 7 2.5/2.5 pts
What does encapsulation hide?
A) Code errors
B) Implementation details
C) Inheritance properties
D) Method overloads
Answer: B) Implementation details
Question 8 2.5/2.5 pts
What is abstraction?
A) Hiding complex implementation details and showing only
essential features
B) Combining methods and attributes in a class
C) Reusing code through inheritance
D) Overriding methods in subclasses
Answer: A) Hiding complex implementation details and
showing only essential features
Question 9 2.5/2.5 pts
Which concept allows a class to inherit methods and attributes
from another class?
A) Encapsulation
B) Abstraction
C) Inheritance
D) Polymorphism
Answer: C) Inheritance
Question 10 2.5/2.5 pts
Which keyword is used to create an instance of a class?
A) create
B) define
C) class
D) new
Answer: D) new
Question 11 2.5/2.5 pts
What is a constructor?
A) A method that initializes objects
B) A method that destroys objects
C) A class that inherits from another class
D) A method that defines data types
Answer: A) A method that initializes objects
Question 12 2.5/2.5 pts
What does a destructor do?
A) Initializes objects
B) Cleans up resources before an object is destroyed
C) Creates new instances of a class
D) Hides implementation details
Answer: B) Cleans up resources before an object is
destroyed
Question 13 2.5/2.5 pts
What is method overloading?
A) Defining multiple methods with the same name but different
parameters
B) Providing a new implementation for a method inherited from a
superclass
C) Combining methods into a single unit
D) Hiding implementation details
Answer: A) Defining multiple methods with the same name
but different parameters
Question 14 2.5/2.5 pts
What is method overriding?
A) Providing a new implementation for a method inherited from a
superclass
B) Creating multiple methods with different names
C) Initializing an object
D) Reusing code through inheritance
Answer: A) Providing a new implementation for a method
inherited from a superclass
Question 15 2.5/2.5 pts
Which access modifier restricts access to a class's members to
within the same class?
A) public
B) private
C) protected
D) default
Answer: B) private
Question 16 2.5/2.5 pts
Which access modifier allows access from any other class?
A) private
B) protected
C) default
D) public
Answer: D) public
Question 17 2.5/2.5 pts
What is an abstract class?
A) A class that cannot be instantiated and may contain abstract
methods
B) A class with only private methods
C) A class that defines constructors
D) A class with all methods implemented
Answer: A) A class that cannot be instantiated and may
contain abstract methods
Question 18 2.5/2.5 pts
What is an interface in OOP?
A) A contract that defines methods without implementing them
B) A class that inherits from another class
C) A special form of method overloading
D) A type of constructor
Answer: A) A contract that defines methods without
implementing them
Question 19 2.5/2.5 pts
Which concept helps in hiding complexity by showing only the
necessary details?
A) Inheritance
B) Abstraction
C) Polymorphism
D) Encapsulation
Answer: B) Abstraction
Question 20 2.5/2.5 pts
What is the purpose of a getter method?
A) To retrieve the value of a private attribute
B) To modify the value of a private attribute
C) To initialize an object
D) To define a class
Answer: A) To retrieve the value of a private attribute
Question 21 2.5/2.5 pts
What is the purpose of a setter method?
A) To modify the value of a private attribute
B) To retrieve the value of a private attribute
C) To create a new instance of a class
D) To define an abstract class
Answer: A) To modify the value of a private attribute
Question 22 2.5/2.5 pts
What does 'composition' refer to in OOP?
A) Creating complex types by combining objects of other classes
B) A type of method overloading
C) Inheriting from multiple classes
D) Encapsulating a class
Answer: A) Creating complex types by combining objects
of other classes
Question 23 2.5/2.5 pts
What does 'aggregation' mean in OOP?
A) A special form of association where one class is a part of
another class
B) Combining multiple methods into a single class
C) Creating new classes from existing ones
D) Hiding implementation details
Answer: A) A special form of association where one class
is a part of another class
Question 24 2.5/2.5 pts
What is a derived class?
A) A class that inherits from another class (base class)
B) A class that defines methods
C) A class with only private members
D) A class that implements an interface
Answer: A) A class that inherits from another class (base
class)
Question 25 2.5/2.5 pts
What is a base class?
A) A class that is inherited by another class
B) A class that defines constructors
C) A class that encapsulates methods
D) A class that implements an interface
Answer: A) A class that is inherited by another class
Question 26 2.5/2.5 pts
What does 'loose coupling' refer to in OOP?
A) Reducing dependencies between classes
B) Combining multiple classes into one
C) Overriding methods in subclasses
D) Defining multiple constructors
Answer: A) Reducing dependencies between classes
Question 27 2.5/2.5 pts
What is 'tight coupling'?
A) A scenario where classes are highly dependent on each other
B) Hiding implementation details
C) Using multiple methods with the same name
D) Defining multiple interfaces
Answer: A) A scenario where classes are highly dependent
on each other
Question 28 2.5/2.5 pts
What is a class in OOP?
A) A blueprint for creating objects
B) An instance of an object
C) A method for hiding data
D) A type of polymorphism
Answer: A) A blueprint for creating objects
Question 29 2.5/2.5 pts
What is an object in OOP?
A) An instance of a class
B) A method that defines data
C) A type of access modifier
D) A form of inheritance
Answer: A) An instance of a class
Question 30 2.5/2.5 pts
What is the purpose of the 'this' keyword?
A) To refer to the current instance of a class
B) To define a new class
C) To initialize a constructor
D) To override a method
Answer: A) To refer to the current instance of a class
Question 31 2.5/2.5 pts
What does 'static' keyword indicate in a class context?
A) A member that belongs to the class rather than any instance
B) A member that is shared between objects
C) A method that cannot be overridden
D) A property that cannot be modified
Answer: A) A member that belongs to the class rather
than any instance
Question 32 2.5/2.5 pts
What is a virtual method?
A) A method that can be overridden in a derived class
B) A method that cannot be overridden
C) A method that initializes objects
D) A method that defines data types
Answer: A) A method that can be overridden in a derived
class
Question 33 2.5/2.5 pts
What is an abstract method?
A) A method that must be implemented by any derived class
B) A method that provides a default implementation
C) A method that is private
D) A method that is static
Answer: A) A method that must be implemented by any
derived class
Question 34 2.5/2.5 pts
What is the use of 'super' keyword?
A) To call a method from the superclass
B) To create a new class
C) To define an interface
D) To hide implementation details
Answer: A) To call a method from the superclass
Question 35 2.5/2.5 pts
What does 'final' keyword indicate when used with a class?
A) The class cannot be subclassed
B) The class can be instantiated
C) The class can be abstract
D) The class can be overridden
Answer: A) The class cannot be subclassed
Question 36 2.5/2.5 pts
What is an example of a 'composition' relationship?
A) A car has an engine
B) A dog is an animal
C) A student attends classes
D) A book has chapters
Answer: A) A car has an engine
Question 37 2.5/2.5 pts
What is a 'singleton' pattern?
A) A design pattern that restricts the instantiation of a class to
one object
B) A design pattern that allows multiple instances of a class
C) A pattern used for inheritance
D) A pattern used for method overloading
Answer: A) A design pattern that restricts the
instantiation of a class to one object
Question 38 2.5/2.5 pts
Which principle allows different classes to use the same method
name but behave differently?
A) Encapsulation
B) Abstraction
C) Polymorphism
D) Inheritance
Answer: C) Polymorphism
Question 39 2.5/2.5 pts
What does 'overloading' allow in a class?
A) Multiple methods with the same name but different parameters
B) Multiple methods with the same parameters
C) Single method with multiple names
D) Overriding a superclass method
Answer: A) Multiple methods with the same name but
different parameters
Question 40 2.5/2.5 pts
What is 'composition' in terms of object relationships?
A) Objects are composed of other objects
B) Methods are composed into classes
C) Classes inherit from other classes
D) Methods are overloaded in a class
Answer: A) Objects are composed of other objects
Question 41 2.5/2.5 pts
What does 'encapsulation' refer to in OOP?
A) Hiding the internal state and requiring all interaction to be
performed through an object's methods
B) Extending a class with new methods
C) Reusing a class's properties in multiple classes
D) Allowing methods to be called on different types of objects
Answer: A) Hiding the internal state and requiring all
interaction to be performed through an object's methods
Question 42 2.5/2.5 pts
What is 'dependency injection'?
A) A technique to achieve inversion of control by passing
dependencies to a class
B) A method of creating new objects
C) A technique for method overloading
D) A method for hiding implementation details
Answer: A) A technique to achieve inversion of control by
passing dependencies to a class
Question 43 2.5/2.5 pts
What is an 'interface' used for in OOP?
A) To define a contract that other classes must adhere to
B) To create an abstract class
C) To define implementation details
D) To initialize objects
Answer: A) To define a contract that other classes must
adhere to
Question 44 2.5/2.5 pts
What is 'inheritance' in object-oriented programming?
A) A mechanism where one class acquires the properties and
behaviors of another class
B) A method to overload functionality
C) A pattern to encapsulate data
D) A technique to create new classes from existing ones
Answer: A) A mechanism where one class acquires the
properties and behaviors of another class
Question 45 2.5/2.5 pts
What is the primary purpose of the 'abstract' keyword in a class
definition?
A) To prevent the class from being instantiated and to require
subclassing
B) To provide default implementations for methods
C) To create an interface
D) To define private methods
Answer: A) To prevent the class from being instantiated
and to require subclassing
Question 46 2.5/2.5 pts
What is the difference between an 'abstract class' and an
'interface'?
A) An abstract class can have implemented methods, while an
interface cannot
B) An interface can have constructors, while an abstract class
cannot
C) An abstract class cannot be subclassed, while an interface can
D) An interface can define instance variables, while an abstract
class cannot
Answer: A) An abstract class can have implemented
methods, while an interface cannot
Question 47 2.5/2.5 pts
What is 'dynamic binding' in OOP?
A) The process of linking a method call to its method definition at
runtime
B) The process of defining a method in a class
C) The process of creating a new class
D) The process of compiling code
Answer: A) The process of linking a method call to its
method definition at runtime
Question 48 2.5/2.5 pts
Which principle helps in reducing code duplication in OOP?
A) Inheritance
B) Polymorphism
C) Encapsulation
D) Abstraction
Answer: A) Inheritance
Question 49 2.5/2.5 pts
What does the 'protected' access modifier allow?
A) Access to the member by its own class and its subclasses
B) Access to the member only within its own class
C) Access to the member from any class
D) Access to the member by its own class and the same package
Answer: A) Access to the member by its own class and its
subclasses
Question 50 2.5/2.5 pts
What is 'message passing' in OOP?
A) The process of sending data and requests between objects
B) The process of initializing objects
C) The process of hiding implementation details
D) The process of creating abstract classes
Answer: A) The process of sending data and requests
between objects
Question 51 2.5/2.5 pts
What is a 'final' method in Java?
A) A method that cannot be overridden by subclasses
B) A method that can be overridden
C) A method that initializes objects
D) A method that defines abstract behavior
Answer: A) A method that cannot be overridden by
subclasses
Question 52 2.5/2.5 pts
Which keyword is used to refer to the parent class constructor?
A) this
B) super
C) parent
D) base
Answer: B) super
Question 53 2.5/2.5 pts
What is a 'default' method in an interface?
A) A method with a default implementation provided in the
interface
B) A method that must be implemented by any class
C) A method that is private to the interface
D) A method that overrides a superclass method
Answer: A) A method with a default implementation
provided in the interface
Question 54 2.5/2.5 pts
What does 'dynamic dispatch' refer to?
A) The process of determining which method implementation to
call at runtime
B) The process of compiling code
C) The process of creating a new class
D) The process of linking a method to its class at compile time
Answer: A) The process of determining which method
implementation to call at runtime
Question 55 2.5/2.5 pts
What is the purpose of a 'static' method?
A) To belong to the class rather than any instance of the class
B) To be overridden in subclasses
C) To access private attributes of the class
D) To define instance-specific behavior
Answer: A) To belong to the class rather than any instance
of the class
Question 56 2.5/2.5 pts
What does 'overriding' a method allow you to do?
A) Provide a new implementation for a method inherited from a
superclass
B) Create multiple methods with the same name
C) Define methods in an interface
D) Access private data of a superclass
Answer: A) Provide a new implementation for a method
inherited from a superclass
Question 57 2.5/2.5 pts
What is the role of the 'abstract' keyword in a method
declaration?
A) To declare a method that must be implemented by any
subclass
B) To provide a default implementation
C) To initialize objects
D) To define static behavior
Answer: A) To declare a method that must be
implemented by any subclass
Question 58 2.5/2.5 pts
What is a 'class method'?
A) A method that is associated with the class itself rather than
any object instance
B) A method that is private to the class
C) A method that initializes objects
D) A method that overrides a superclass method
Answer: A) A method that is associated with the class
itself rather than any object instance
Question 59 2.5/2.5 pts
What is the concept of 'dependency inversion'?
A) High-level modules should not depend on low-level modules;
both should depend on abstractions
B) Low-level modules should depend on high-level modules
C) Abstractions should depend on details
D) Implementation details should depend on class hierarchies
Answer: A) High-level modules should not depend on low-
level modules; both should depend on abstractions
Question 60 2.5/2.5 pts
What is a 'mixin' in OOP?
A) A class that provides methods to other classes through
multiple inheritance
B) A method that is abstract
C) A pattern for creating singletons
D) A way to define constructors
Answer: A) A class that provides methods to other classes
through multiple inheritance
Question 61 2.5/2.5 pts
What does 'class coupling' refer to?
A) The degree to which a class is dependent on other classes
B) The process of defining methods in a class
C) The process of creating multiple classes
D) The concept of method overloading
Answer: A) The degree to which a class is dependent on
other classes
Question 62 2.5/2.5 pts
What is the purpose of 'interface segregation'?
A) To create interfaces that are specific to a class's needs,
avoiding 'fat' interfaces
B) To combine multiple interfaces into a single one
C) To hide implementation details within an interface
D) To define abstract classes
Answer: A) To create interfaces that are specific to a
class's needs, avoiding 'fat' interfaces
Question 63 2.5/2.5 pts
What is 'composition over inheritance'?
A) Using composition to achieve code reuse rather than relying
solely on inheritance
B) Creating multiple classes through inheritance
C) Combining methods into a single class
D) Hiding details within an abstract class
Answer: A) Using composition to achieve code reuse
rather than relying solely on inheritance
Question 64 2.5/2.5 pts
What does 'method hiding' refer to?
A) A subclass defining a method with the same name as in its
superclass, making the superclass method inaccessible
B) Providing a new implementation for an inherited method
C) Overloading a method in a class
D) Declaring a method as abstract
Answer: A) A subclass defining a method with the same
name as in its superclass, making the superclass method
inaccessible
Question 65 2.5/2.5 pts
What is 'object composition'?
A) Creating complex objects by combining simpler objects
B) Defining multiple methods with the same name
C) Using a class to create objects
D) Inheriting properties from multiple classes
Answer: A) Creating complex objects by combining simpler
objects
Question 66 2.5/2.5 pts
What does 'dynamic typing' refer to?
A) The type of a variable is checked at runtime rather than
compile time
B) The process of defining data types in classes
C) The process of creating objects
D) The process of linking methods to their implementations at
compile time
Answer: A) The type of a variable is checked at runtime
rather than compile time
Question 67 2.5/2.5 pts
What is 'method chaining'?
A) Calling multiple methods on the same object in a single
statement
B) Defining methods with the same name
C) Overloading methods in a class
D) Hiding method implementations
Answer: A) Calling multiple methods on the same object in
a single statement
Question 68 2.5/2.5 pts
What is 'object-oriented design' (OOD)?
A) Designing systems using object-oriented principles to achieve
modular and reusable code
B) Designing systems with procedural programming techniques
C) Creating single-use methods
D) Defining data types and variables
Answer: A) Designing systems using object-oriented
principles to achieve modular and reusable code
Question 69 2.5/2.5 pts
What is 'object-oriented analysis' (OOA)?
A) Analyzing a system by identifying objects, their attributes, and
their interactions
B) Analyzing system performance using procedural methods
C) Creating new classes from existing ones
D) Defining interfaces and abstract classes
Answer: A) Analyzing a system by identifying objects,
their attributes, and their interactions
Question 70 2.5/2.5 pts
What is 'inheritance hierarchy'?
A) The structure showing the relationship between parent and
child classes
B) The number of methods in a class
C) The level of abstraction in a system
D) The process of overloading methods
Answer: A) The structure showing the relationship
between parent and child classes
Question 71 2.5/2.5 pts
What is 'protocol-oriented programming'?
A) A programming paradigm that emphasizes the use of protocols
(similar to interfaces)
B) A method of creating classes
C) A technique for method overloading
D) A way to define static methods
Answer: A) A programming paradigm that emphasizes the
use of protocols (similar to interfaces)
Question 72 2.5/2.5 pts
What is a 'design pattern'?
A) A general reusable solution to a commonly occurring problem
in software design
B) A specific implementation of a class
C) A technique for creating singletons
D) A method of hiding implementation details
Answer: A) A general reusable solution to a commonly
occurring problem in software design
Question 73 2.5/2.5 pts
What is a 'singleton pattern'?
A) A design pattern that ensures a class has only one instance
and provides a global point of access
B) A pattern used to create multiple instances of a class
C) A method of creating abstract classes
D) A pattern for method overloading
Answer: A) A design pattern that ensures a class has only
one instance and provides a global point of access
Question 74 2.5/2.5 pts
What is 'prototype pattern'?
A) A design pattern that creates new objects by copying an
existing object
B) A pattern used for inheritance
C) A method for defining static methods
D) A pattern for encapsulating data
Answer: A) A design pattern that creates new objects by
copying an existing object
Question 75 2.5/2.5 pts
What does 'factory method pattern' do?
A) Provides an interface for creating objects but allows subclasses
to alter the type of objects that will be created
B) Defines a method for overriding functionality
C) Provides a way to implement multiple interfaces
D) Creates a single instance of a class
Answer: A) Provides an interface for creating objects but
allows subclasses to alter the type of objects that will be
created
Question 76 2.5/2.5 pts
What is a 'builder pattern'?
A) A design pattern that separates the construction of a complex
object from its representation
B) A pattern for defining class constructors
C) A method for hiding implementation details
D) A pattern used to create singletons
Answer: A) A design pattern that separates the
construction of a complex object from its representation
Question 77 2.5/2.5 pts
What is the 'observer pattern'?
A) A design pattern where an object maintains a list of its
dependents and notifies them of any state changes
B) A pattern for creating singletons
C) A method for overriding superclass methods
D) A technique for method chaining
Answer: A) A design pattern where an object maintains a
list of its dependents and notifies them of any state
changes
Question 78 2.5/2.5 pts
What is 'strategy pattern'?
A) A design pattern that defines a family of algorithms,
encapsulates each one, and makes them interchangeable
B) A pattern for creating singletons
C) A method for overloading functionality
D) A technique for hiding implementation details
Answer: A) A design pattern that defines a family of
algorithms, encapsulates each one, and makes them
interchangeable
Question 79 2.5/2.5 pts
What is 'adapter pattern'?
A) A design pattern that allows incompatible interfaces to work
together
B) A pattern for defining abstract methods
C) A method for chaining multiple methods
D) A pattern for creating singletons
Answer: A) A design pattern that allows incompatible
interfaces to work together
Question 80 2.5/2.5 pts
What is 'decorator pattern'?
A) A design pattern that allows behavior to be added to individual
objects, either statically or dynamically, without affecting the
behavior of other objects
B) A pattern for creating singletons
C) A method for overloading methods
D) A technique for defining abstract classes
Answer: A) A design pattern that allows behavior to be
added to individual objects, either statically or
dynamically, without affecting the behavior of other
objects
Question 81 2.5/2.5 pts
What is 'command pattern'?
A) A design pattern that encapsulates a request as an object,
thereby allowing for parameterization of clients with different
requests
B) A pattern for creating singletons
C) A method for defining methods in an interface
D) A pattern for method overloading
Answer: A) A design pattern that encapsulates a request
as an object, thereby allowing for parameterization of
clients with different requests
Question 82 2.5/2.5 pts
What is 'bridge pattern'?
A) A design pattern that separates an abstraction from its
implementation so that the two can vary independently
B) A pattern for defining abstract methods
C) A method for chaining methods
D) A technique for creating singletons
Answer: A) A design pattern that separates an abstraction
from its implementation so that the two can vary
independently
Question 83 2.5/2.5 pts
What is the 'template method pattern'?
A) A design pattern that defines the skeleton of an algorithm in a
method, deferring some steps to subclasses
B) A pattern for creating singletons
C) A method for hiding implementation details
D) A technique for defining interfaces
Answer: A) A design pattern that defines the skeleton of
an algorithm in a method, deferring some steps to
subclasses
Question 84 2.5/2.5 pts
What is the 'state pattern'?
A) A design pattern that allows an object to alter its behavior
when its internal state changes
B) A pattern for creating singletons
C) A method for defining abstract methods
D) A technique for chaining methods
Answer: A) A design pattern that allows an object to alter
its behavior when its internal state changes
Question 85 2.5/2.5 pts
What is the 'flyweight pattern'?
A) A design pattern that uses sharing to support a large number
of fine-grained objects efficiently
B) A pattern for creating singletons
C) A method for overloading methods
D) A technique for defining abstract classes
Answer: A) A design pattern that uses sharing to support
a large number of fine-grained objects efficiently
Question 86 2.5/2.5 pts
What is the 'proxy pattern'?
A) A design pattern that provides a surrogate or placeholder for
another object to control access to it
B) A pattern for creating singletons
C) A method for defining interfaces
D) A technique for chaining methods
Answer: A) A design pattern that provides a surrogate or
placeholder for another object to control access to it
Question 87 2.5/2.5 pts
What does 'code reuse' refer to in OOP?
A) Using existing code to create new functionality, typically
through inheritance or composition
B) Creating new methods
C) Hiding implementation details
D) Defining new classes
Answer: A) Using existing code to create new
functionality, typically through inheritance or composition
Question 88 2.5/2.5 pts
What is 'object mutation'?
A) Changing the state of an object after it has been created
B) Creating new objects
C) Defining methods for a class
D) Inheriting properties from a superclass
Answer: A) Changing the state of an object after it has
been created
Question 89 2.5/2.5 pts
What does 'type safety' ensure in OOP?
A) That operations on objects are performed with the correct data
types, avoiding type errors
B) That methods are overloaded properly
C) That multiple classes can inherit from a single class
D) That interfaces are defined correctly
Answer: A) That operations on objects are performed with
the correct data types, avoiding type errors
Question 90 2.5/2.5 pts
What is the difference between 'deep copy' and 'shallow copy'?
A) A deep copy duplicates the object and all objects referenced by
it, while a shallow copy only duplicates the object itself
B) A shallow copy duplicates all objects, while a deep copy only
duplicates the top-level object
C) A deep copy is faster than a shallow copy
D) There is no difference between deep and shallow copies
Answer: A) A deep copy duplicates the object and all
objects referenced by it, while a shallow copy only
duplicates the object itself
Question 91 2.5/2.5 pts
What is 'object identity'?
A) The unique identifier for an object that distinguishes it from
other objects
B) The class of the object
C) The methods defined in the object
D) The data contained within the object
Answer: A) The unique identifier for an object that
distinguishes it from other objects
Question 92 2.5/2.5 pts
What is 'refactoring'?
A) The process of restructuring existing code without changing its
external behavior
B) The process of creating new classes
C) The process of defining methods in an interface
D) The process of creating abstract classes
Answer: A) The process of restructuring existing code
without changing its external behavior
Question 93 2.5/2.5 pts
What does 'method delegation' refer to?
A) Passing method calls from one object to another to handle the
request
B) Defining multiple methods with the same name
C) Creating methods in an abstract class
D) Hiding method implementations
Answer: A) Passing method calls from one object to
another to handle the request
Question 94 2.5/2.5 pts
What is 'object-oriented analysis and design' (OOAD)?
A) A combination of analysis and design phases in which object-
oriented principles are applied to system development
B) A method for defining interfaces
C) A technique for creating singletons
D) A method for chaining methods
Answer: A) A combination of analysis and design phases in
which object-oriented principles are applied to system
development
Question 95 2.5/2.5 pts
What is 'software engineering'?
A) The application of engineering principles to software
development for creating reliable and maintainable systems
B) The process of defining methods and classes
C) The process of creating new objects
D) The process of hiding implementation details
Answer: A) The application of engineering principles to
software development for creating reliable and
maintainable systems