1. What is the primary purpose of object-oriented testing?
a) Ensuring efficient memory allocation
b) Validating the correctness and consistency of OOA & OOD models
c) Optimizing code compilation
d) Enhancing user interface design
Answer: b) Validating the correctness and consistency of OOA & OOD models
Explanation: Object-oriented testing focuses on verifying that the Object-Oriented Analysis (OOA) and Object-Oriented Design (OOD) models accurately represent the requirements and are consistent with each other.
2. Which testing strategy emphasizes testing individual methods or functions of classes?
a) Unit testing
b) Integration testing
c) System testing
d) Acceptance testing
Answer: a) Unit testing
Explanation: Unit testing is a testing strategy where individual methods or functions of classes are tested in isolation to ensure they function correctly.
3. Which of the following is NOT a characteristic of a good test case for object-oriented software?
a) It covers multiple functionalities
b) It is easily reproducible
c) It tests only one aspect at a time
d) It is independent of other test cases
Answer: a) It covers multiple functionalities
Explanation: A good test case for object-oriented software should focus on testing one aspect at a time, be easily reproducible, and independent of other test cases to ensure accurate results.
4. Which phase of the software development life cycle primarily involves creating OOA & OOD models?
a) Design
b) Implementation
c) Requirements
d) Testing
Answer: a) Design
Explanation: Object-Oriented Analysis (OOA) and Object-Oriented Design (OOD) are primarily carried out during the design phase of the software development life cycle.
5. What is the role of Rational Tool Mentors in software development?
a) They provide guidance on using Rational Unified Process (RUP)
b) They automate the testing process
c) They assist in project management tasks
d) They optimize code compilation
Answer: a) They provide guidance on using Rational Unified Process (RUP)
Explanation: Rational Tool Mentors provide guidance and support in using Rational Unified Process (RUP), a software development process framework.
6. Which design pattern is used to ensure that a class has only one instance and provides a global point of access to that instance?
a) Singleton
b) Factory
c) Observer
d) Strategy
Answer: a) Singleton
Explanation: The Singleton design pattern ensures that a class has only one instance and provides a global point of access to that instance.
7. Which design pattern is used to define a family of algorithms, encapsulate each one, and make them interchangeable?
a) Singleton
b) Factory
c) Observer
d) Strategy
Answer: d) Strategy
Explanation: The Strategy design pattern is used to define a family of algorithms, encapsulate each one, and make them interchangeable.
8. Which design pattern is used to define an interface for creating an object, but allows subclasses to alter the type of objects that will be instantiated?
a) Singleton
b) Factory
c) Observer
d) Strategy
Answer: b) Factory
Explanation: The Factory design pattern is used to define an interface for creating an object, but allows subclasses to alter the type of objects that will be instantiated.
9. In object-oriented testing, what does “consistency of OOA & OOD models” refer to?
a) Ensuring that the models are visually appealing
b) Verifying that the models comply with industry standards
c) Confirming that the models accurately represent system requirements and are compatible with each other
d) Checking for errors in the user interface
Answer: c) Confirming that the models accurately represent system requirements and are compatible with each other
Explanation: Consistency of OOA & OOD models in object-oriented testing refers to verifying that the models accurately represent system requirements and are compatible with each other.
10. Which testing strategy focuses on verifying interactions between various components or modules?
a) Unit testing
b) Integration testing
c) System testing
d) Acceptance testing
Answer: b) Integration testing
Explanation: Integration testing focuses on verifying interactions between various components or modules to ensure they work together correctly.