Introduction to Computing MCQs with Answers
Practice important Introduction to Computing MCQs with answers and explanations.
Chapter: 139
Q1981:
Which of the following is an example of a design pattern library provided by Microsoft?
A. .NET Framework
B. C++ Standard Template Library
C. Java API
D. Python Standard Library
Correct Answer:
A
Chapter: 139
Q1982:
Fill in the blank: The Decorator pattern helps in designing systems that perform different ________ depending on the situation.
A. Combinations of activities
B. Database queries
C. Network configurations
D. User interface designs
Correct Answer:
A
Chapter: 139
Q1983:
Fill in the blank: The origins of design patterns in software engineering lie in the research of ________.
A. Christopher Alexander
B. Alan Turing
C. Bill Gates
D. Dennis Ritchie
Correct Answer:
A
Chapter: 139
Q1984:
Fill in the blank: The Adapter pattern is used when a prefabricated module’s ________ is incompatible with the current application.
A. Interface
B. Functionality
C. Documentation
D. License
Correct Answer:
A
Chapter: 139
Q1985:
Fill in the blank: The ________ pattern is used to manage the complexity of software systems with multiple options.
A. Decorator
B. Singleton
C. Observer
D. Builder
Correct Answer:
A
Chapter: 139
Q1986:
Fill in the blank: Design patterns play a crucial role in software engineering by providing standardized solutions that help in ________ the software design process.
A. Simplifying
B. Complicating
C. Obfuscating
D. Disrupting
Correct Answer:
A
Chapter: 140
Q1987:
Which design pattern is used to create loosely coupled systems by creating and reusing instances?
A. Factory Design Pattern
B. Singleton Design Pattern
C. Observer Design Pattern
D. Decorator Design Pattern
Correct Answer:
A
Chapter: 140
Q1988:
The Factory Design Pattern falls under which category of design patterns?
A. Creational Pattern
B. Structural Pattern
C. Behavioral Pattern
D. Abstract Pattern
Correct Answer:
A
Chapter: 140
Q1989:
What is the main purpose of the Factory Design Pattern?
A. To create and reuse instances
B. To manage memory allocation
C. To optimize database queries
D. To handle exceptions
Correct Answer:
A
Chapter: 140
Q1990:
In the Factory Design Pattern, what does the factory class provide?
A. Abstraction between Client and Car
B. Direct interaction with hardware
C. Real-time error checking
D. User interface design
Correct Answer:
A
Chapter: 140
Q1991:
Which of the following is an example of an object that can be created using the Factory Design Pattern?
A. Honda
B. BMW
C. Mercedes
D. All of the above
Correct Answer:
D
Chapter: 140
Q1992:
What real-world concept is the Factory Design Pattern based on?
A. Factory
B. Library
C. Museum
D. Store
Correct Answer:
A
Chapter: 140
Q1993:
When should the Shopping Cart Design Pattern be used?
A. When the user can buy more than one product
B. When there is only one product to sell
C. When there is no need for multiple instances
D. When the user cannot return later
Correct Answer:
A
Chapter: 140
Q1994:
The Shopping Cart Design Pattern should not be used in which scenario?
A. When there is only one product to sell
B. When the user may want to return later
C. When the user may want to buy multiple products
D. When the user may want to conduct payment later
Correct Answer:
A
Chapter: 140
Q1995:
Why is the Shopping Cart Design Pattern not suitable for Application Service Providers (ASPs)?
A. It does not make sense for the user to buy more than one product at a time
B. Users need to buy multiple products
C. Users need to return later to conduct payment
D. Users need to upgrade services at different times
Correct Answer:
A
Chapter: 140
Q1996:
Fill in the blank: The ________ Design Pattern is used to create loosely coupled systems by providing abstraction between the client and objects.
A. Factory
B. Observer
C. Decorator
D. Singleton
Correct Answer:
A
Chapter: 140
Q1997:
Fill in the blank: The ________ Design Pattern is ideal when the user may want to return later to continue shopping or conduct payment.
A. Shopping Cart
B. Factory
C. Observer
D. Decorator
Correct Answer:
A
Chapter: 140
Q1998:
Fill in the blank: The Factory Design Pattern provides abstraction between the Client and ________ when creating instances.
A. Car
B. Hardware
C. User Interface
D. Database
Correct Answer:
A
Chapter: 140
Q1999:
Fill in the blank: The Shopping Cart Design Pattern should be avoided when your site is arranged so that it doesn’t make sense for the user to buy more than ________.
A. One product
B. One instance
C. Multiple products
D. Multiple instances
Correct Answer:
A
Chapter: 140
Q2000:
Fill in the blank: A key feature of the Factory Design Pattern is that it allows the factory to ________ new items as they are added to the manufacturing process.
A. Manufacture
B. Discard
C. Ignore
D. Reprogram
Correct Answer:
A