Software Architecture Patterns
- 112Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
112 questions
- 1In software design, architecture patterns act as_____for structuring robust software systems.
Hint
Think of a plan that guides construction.
Answer
blueprints
Explanation
Architecture patterns are described as blueprints that guide how robust software systems are built.
- 2Good software architecture helps systems remain scalable, maintainable, secure, and_____as needs change.
Hint
Consider the ability to adjust to future needs.
Answer
adaptable
Explanation
The content identifies scalability, maintainability, security, and adaptability as important qualities of software systems.
- 3Architecture patterns help developers address_____design challenges that recur across software projects.
Hint
These are challenges that appear again and again.
Answer
recurring
Explanation
Patterns provide established approaches for recurring design challenges rather than requiring a new solution every time.
- 4When choosing an architecture, developers should begin by understanding project requirements and_____.
Hint
Consider limits the project must work within.
Answer
constraints
Explanation
The project’s specific requirements and constraints are the first factors to understand when selecting a pattern.
- 5Architecture patterns should be treated as_____rather than strict rules.
Hint
They inform decisions without dictating every detail.
Answer
guides
Explanation
Patterns provide structure, but developers can adapt or blend them to meet a project’s particular needs.
- 6The size and complexity of an application, performance requirements, security needs, and budget limitations are all factors in choosing a_____.
Hint
These considerations help determine the appropriate structural blueprint.
Answer
software architecture pattern
Explanation
The content lists application size and complexity, performance, security, and budget among the factors that influence pattern selection.
- 7A pattern that matches a development team’s skills and experience is more likely to support project_____.
Hint
Think of the result supported by a team using familiar approaches.
Answer
success
Explanation
Choosing a pattern the team is comfortable with is important for success; the choice should fit both the team’s strengths and project needs.
- 8If scalability and fault tolerance are top priorities,_____or space-based architecture may be options to consider.
Hint
This pattern divides an application into independent services.
Answer
microservices architecture
Explanation
The content identifies microservices architecture and space-based architecture as possible choices when scalability and fault tolerance are priorities.
- 9When ease of maintenance and development is especially important, layered architecture or_____may be a better fit.
Hint
This web-development pattern separates model, view, and controller responsibilities.
Answer
MVC
Explanation
Layered architecture and MVC are suggested when ease of maintenance and development are important.
- 10The type of data and the complexity of its relationships can influence the choice of an architecture_____.
Hint
The data’s characteristics can help determine the structural approach.
Answer
pattern
Explanation
Data characteristics, including complex relationships and consistency needs, are relevant to architecture selection.
- 11For complex data relationships that need to remain consistent, the_____pattern may be a good choice.
Hint
This pattern separates data access from core application logic.
Answer
repository
Explanation
The repository pattern can be useful when an application has complex data relationships and needs data consistency.
- 12When data must pass through different processing stages, the_____pattern may be suitable.
Hint
Its name evokes data traveling through a series of processing steps.
Answer
pipe filter
Explanation
The pipe filter pattern is suited to data that needs to be processed in different stages.
- 13Developers can combine and adapt patterns to create solutions for_____situations.
Hint
Patterns are not limited to one rigid application context.
Answer
different
Explanation
The content emphasizes that patterns can be blended and adapted to solve many different situations.
- 14Choosing a pattern involves understanding which_____are acceptable for the project’s goals.
Hint
Every architectural choice has benefits and costs.
Answer
compromises
Explanation
There is no perfect pattern for every project; developers must determine which trade-offs best support their goals.
- 15The goal of applying architecture patterns is to create software that is robust, maintainable, and_____.
Hint
The software should be able to keep up with changing user needs.
Answer
adaptable
Explanation
The desired outcome is software that is strong, easy to maintain, and able to adapt as users’ needs change.
- 16Layered architecture organizes an application into distinct layers, each with a specific_____.
Hint
Each layer has its own responsibility.
Answer
job
Explanation
The pattern separates an application into layers with distinct responsibilities.
- 17In layered architecture, the data layer stores the application’s raw_____.
Hint
This layer corresponds to the pantry in the kitchen analogy.
Answer
data
Explanation
The data layer holds the raw data, just as a pantry stores ingredients before they are prepared.
- 18In layered architecture, the business layer handles the application’s core_____.
Hint
This layer processes and combines information according to the application’s rules.
Answer
logic
Explanation
The business layer handles core logic, corresponding to the preparation area in the kitchen analogy.
- 19The application layer executes tasks and coordinates activity between the_____.
Hint
It corresponds to where the cooking takes place in the analogy.
Answer
layers
Explanation
The application layer executes tasks and coordinates everything between the other layers.
- 20The presentation layer provides the user interface that the user_____.
Hint
It is the plated dish presented to the diner in the analogy.
Answer
interacts with
Explanation
The presentation layer is the interface presented to and used by the user.
- 21Separating an application into layers supports separation of_____.
Hint
Each layer has a distinct responsibility instead of mixing unrelated jobs.
Answer
concerns
Explanation
Separation of concerns is one of the key benefits of layered architecture.
- 22Because the layers have distinct responsibilities, they can be developed and maintained relatively_____.
Hint
One layer can be worked on without treating the whole application as one unit.
Answer
independently
Explanation
Layered architecture allows each layer to be developed and maintained kind of independently.
- 23Layered architecture can make a system more scalable, flexible, and easier to_____.
Hint
This benefit involves locating and resolving problems.
Answer
troubleshoot
Explanation
The content identifies scalability, flexibility, and easier troubleshooting as benefits of layered architecture.
- 24Adding too many layers can make a system unnecessarily_____.
Hint
Too much structure can make a design harder to manage.
Answer
complex
Explanation
Although layers help organize a system, too many of them can increase complexity.
- 25Excessive communication between layers can create performance_____.
Hint
These slow down work as it moves through the system.
Answer
bottlenecks
Explanation
Communication between layers may cause performance bottlenecks, so the number of layers should suit the system’s needs.
- 26E-commerce platforms can use layered architecture to separate parts of the shopping experience, such as browsing products and processing_____.
Hint
This is another step in completing an online purchase.
Answer
payments
Explanation
The content uses e-commerce platforms as an example, with different layers handling activities such as product browsing and payment processing.
- 27A banking app can use layered architecture to separate account information, transaction processing, and the_____.
Hint
This is the part the customer uses directly.
Answer
user interface
Explanation
The banking-app example separates account information and transaction processing from the user interface.
- 28In client-server architecture, clients communicate with a central_____.
Hint
It centrally manages and provides access to resources.
Answer
server
Explanation
Client-server architecture is organized around communication between a central server and multiple clients.
- 29In the library analogy for client-server architecture, the client sends a_____to request a resource.
Hint
A reader asks the librarian for a particular book.
Answer
request
Explanation
Clients request specific resources or services from the server.
- 30In client-server architecture, clients primarily request and use services provided by the_____.
Hint
This central component manages access to shared resources.
Answer
server
Explanation
The server manages and provides access to resources, while clients request and use its services.
- 31A centralized client-server approach can make maintenance easier, improve security, and provide more_____over resources.
Hint
Central management allows greater oversight of resources.
Answer
control
Explanation
The content names easier maintenance, better security, and more control over resources as advantages of client-server architecture.
- 32If the server crashes and clients lose access to its services, the system experiences a single point of_____.
Hint
The risk arises because service depends on one central component.
Answer
failure
Explanation
A server failure can prevent all clients from accessing services, creating a single point of failure.
- 33Client-server systems use redundancy and_____mechanisms to reduce the impact of server failure.
Hint
These arrangements help recover when the central server is unavailable.
Answer
backup
Explanation
Good client-server systems use redundancy and backup mechanisms to address the risk of server failure.
- 34In an email service such as Gmail, the server stores emails and manages their sending and_____.
Hint
This is the other direction of email delivery.
Answer
receiving
Explanation
The server stores messages and manages sending and receiving, while an email app acts as a client for accessing them.
- 35Event-driven architecture is designed to react to events or system_____.
Hint
An event may indicate that something has happened or become different.
Answer
changes
Explanation
Event-driven architecture responds to events or changes, much like a chain reaction.
- 36User actions, sensor readings, and internal system changes can all serve as_____.
Hint
They are occurrences that can trigger software behavior.
Answer
events
Explanation
The content gives user actions, sensor readings, and internal system changes as examples of events.
- 37Unlike a system that follows a fixed path, event-driven architecture responds to what_____.
Hint
The design reacts to occurrences as they arise.
Answer
happens
Explanation
Event-driven systems are designed to respond to events rather than follow only a predetermined path.
- 38Event-driven architecture is useful for applications that must process data in_____.
Hint
The response must happen immediately or with very little delay.
Answer
real time
Explanation
Applications such as stock trading platforms and online games may need to process data in real time.
- 39In online gaming, event-driven systems are useful because each action needs an immediate_____.
Hint
The system must react promptly to player actions.
Answer
response
Explanation
Online gaming is an example where each action needs an immediate response.
- 40Designing, debugging, and testing event-driven systems can be difficult because events may be_____.
Hint
They can occur independently rather than in a single sequential order.
Answer
asynchronous
Explanation
Event-driven systems may involve asynchronous events happening at the same time, which complicates design, debugging, and testing.
- 41Event-driven systems must be designed carefully to maintain reliability and avoid unintended_____.
Hint
Poorly coordinated event reactions can produce unwanted outcomes.
Answer
consequences
Explanation
The content stresses reliability and avoiding unintended consequences when many events occur asynchronously.
- 42A real-time analytics dashboard can use event-driven architecture to update as new_____arrives.
Hint
The dashboard reacts to incoming information.
Answer
data
Explanation
Real-time analytics dashboards are an example because they constantly update as new data comes in.
- 43A fraud detection system can react to transactions by triggering alerts when activity is_____.
Hint
The system identifies activity that may indicate fraud.
Answer
suspicious
Explanation
Fraud detection systems monitor transactions and trigger alerts if they detect suspicious activity.
- 44A car’s anti-lock braking system can use event-driven architecture to react quickly and prevent a wheel_____.
Hint
This is the condition the braking system is designed to prevent.
Answer
lock up
Explanation
The anti-lock braking system reacts to events to help prevent a wheel from locking up.
- 45In pipe filter architecture, each filter performs a specific operation on data as it moves through a series of_____.
Hint
The architecture’s name describes the route data follows.
Answer
pipes
Explanation
Data flows through pipes, with each filter applying a specific operation before passing it onward.
- 46A filter in a pipe filter system transforms or refines data before passing it to the_____filter.
Hint
The data progresses from one processing step to the following one.
Answer
next
Explanation
Each filter has a defined responsibility and passes its transformed data along the pipeline.
- 47The modularity of pipe filter architecture makes it easy to add or remove filters and change the data-processing_____.
Hint
This is the sequence of operations data moves through.
Answer
workflow
Explanation
Adding or removing filters allows developers to adapt the data-processing workflow to changing needs.
- 48Because filters are independent, they can be reused in different_____.
Hint
A filter can be used in more than one data-processing sequence.
Answer
pipelines
Explanation
Independent filters promote code reusability because they can be reused in different pipelines.
- 49When an error appears in a pipe filter system’s final output, debugging may require tracing back through each_____.
Hint
The source of the error may lie in any processing step.
Answer
filter
Explanation
Finding an error in the final output can require tracing through the filters to locate its source.
- 50For pipe filter components to exchange data correctly, all filters must agree on the data_____.
Hint
This specifies how the information is represented and transferred.
Answer
format
Explanation
Agreement on data format is necessary; otherwise, constraints can arise in how data is represented and transferred.
- 51A compiler can use pipe filter architecture to process source code through stages such as lexical analysis, parsing, and code_____.
Hint
This is the final listed compiler stage in the example.
Answer
generation
Explanation
Compiler processing is an example of a pipeline: filters perform lexical analysis, parsing, and code generation.
- 52Image-processing pipelines can use filters to apply effects such as blurring, sharpening, and color_____.
Hint
This effect adjusts the image’s colors.
Answer
correction
Explanation
Image processing is another pipe filter example, with filters applying effects including blurring, sharpening, and color correction.
- 53In microkernel architecture, the minimal core system provides the essential_____.
Hint
It supplies the basic capabilities on which extensions rely.
Answer
functionality
Explanation
The core system provides essential functionality, while plug-in modules add specialized features.
- 54In the microkernel Lego analogy, plug-in modules extend the core with specialized features or_____.
Hint
These adapt the system to particular needs.
Answer
customizations
Explanation
Plug-in modules provide specialized features or customizations beyond the core system’s essential functions.
- 55Microkernel architecture’s modularity allows plug-ins to be added or updated without disrupting the_____.
Hint
This is the minimal foundation that remains in place as modules change.
Answer
core system
Explanation
The pattern makes it possible to add features or update existing ones without disrupting the core system.
- 56In microkernel architecture, fixing one plug-in can be done without affecting other parts of the_____.
Hint
The modules are isolated enough that a change can be localized.
Answer
system
Explanation
A plug-in can be repaired independently, much like replacing a faulty Lego brick without dismantling the whole construction.
- 57As a microkernel system grows, communication between the core and its plug-ins can become_____.
Hint
More components can make coordination harder.
Answer
complicated
Explanation
Communication between the core system and many plug-ins can become complicated as the system grows.
- 58Because the microkernel core is minimal, some functionality may need to be built from scratch instead of using features readily available in more_____architectures.
Hint
This describes architectures organized as a more unified whole.
Answer
monolithic
Explanation
A minimal core may lack features that are readily available in other, more monolithic architectures.
- 59In an operating system example of microkernel architecture, the core kernel handles basics such as memory management and process_____.
Hint
This is the kernel task that determines how processes get time to run.
Answer
scheduling
Explanation
The operating-system example describes the core kernel handling memory management and process scheduling, while drivers and other components act as plug-ins.
- 60Microservices architecture breaks a large application into smaller, independent_____.
Hint
Each component focuses on a particular task or function.
Answer
services
Explanation
Microservices divide an application into smaller independent services, each focused on a specific task or functionality.
- 61In microservices, teams can work on individual services without affecting_____.
Hint
The services are designed to be independent of one another.
Answer
the others
Explanation
Service independence allows teams to work on one service without necessarily affecting the other services.
- 62If one microservice becomes very busy, it can be scaled_____without scaling the entire system.
Hint
Only the service experiencing heavy demand needs to be adjusted.
Answer
independently
Explanation
A busy microservice can be scaled independently, without impacting the rest of the system.
- 63A key challenge of microservices is coordinating communication between many independent_____.
Hint
The challenge involves keeping the separate components working together.
Answer
services
Explanation
Managing communication and coordination among independent services can become complex as their number grows.
- 64As the number of microservices grows, network congestion and the need to secure each service and its interactions become important_____.
Hint
These are risks or issues that teams must address.
Answer
concerns
Explanation
The content highlights network congestion and security of individual services and their interactions as microservices challenges.
- 65Netflix uses microservices for functions such as user authentication and content recommendations, helping it scale and adapt_____.
Hint
The benefit describes how fast the platform can respond to changing demands.
Answer
quickly
Explanation
Netflix is presented as an example of microservices supporting specific functions and enabling rapid scaling and adaptation.
- 66Space-based architecture distributes workload across multiple processing_____.
Hint
These are the separate units that work together on tasks.
Answer
nodes
Explanation
Instead of relying on one powerful server, space-based architecture distributes work across multiple nodes.
- 67Space-based architecture uses a shared memory space that can be accessed by many processing_____.
Hint
These components share access to common resources while working on tasks.
Answer
units
Explanation
The pattern is described as a massive shared memory space accessed by many processing units.
- 68Adding more processing nodes in space-based architecture can help handle larger amounts of data and_____.
Hint
This is the other increasing workload mentioned alongside data.
Answer
traffic
Explanation
The distributed design can handle huge amounts of data and traffic by adding more nodes.
- 69A challenge in space-based architecture is ensuring data_____across all distributed nodes.
Hint
The data should not conflict or diverge among the different components.
Answer
consistency
Explanation
Distributed systems must ensure data consistency across their nodes.
- 70Communication among distributed components can introduce_____that may affect performance.
Hint
This is a delay in communication or response.
Answer
latency
Explanation
Communication between distributed components can add latency, so it must be managed carefully.
- 71Large e-commerce platforms and online gaming platforms use space-based architecture to handle massive workloads and many simultaneous_____.
Hint
The e-commerce example emphasizes many operations occurring at once.
Answer
transactions
Explanation
The content gives large e-commerce platforms handling millions of transactions and online games supporting many connected players as examples of space-based architecture.
- 72In master-slave architecture, the master makes decisions and_____tasks to slave components.
Hint
The master assigns work to the other components.
Answer
delegates
Explanation
The master acts as the brains of the operation, making decisions and delegating tasks to slave components.
- 73In master-slave architecture, slave components carry out assigned tasks and report back to the_____.
Hint
They report to the component coordinating the work.
Answer
master
Explanation
Slave components perform assigned tasks and report their results to the master.
- 74Adding more slave components can help a master-slave system scale to handle a larger_____.
Hint
More workers can take on more work.
Answer
workload
Explanation
The division of labor allows more workers to be added as the workload grows.
- 75Master-slave systems can improve fault tolerance because a task can be reassigned if one worker is_____.
Hint
Another worker can take over when the original one cannot work.
Answer
unavailable
Explanation
If one worker is unavailable, the master can reassign its task to another worker so work can continue.
- 76If the master fails without a backup, it can become a single point of_____.
Hint
The entire arrangement may depend on this coordinating component.
Answer
failure
Explanation
The master component can be a single point of failure if it is not designed robustly.
- 77A_____master can take over when the primary master goes down.
Hint
This component is ready to assume the primary role during a failure.
Answer
backup
Explanation
Robust master-slave systems use failover mechanisms so a backup master can replace a failed primary one.
- 78Communication overhead between the master and slaves can affect performance, especially in_____systems.
Hint
More components can make coordination more demanding.
Answer
large
Explanation
Communication between the master and slaves can become complicated and affect performance, particularly in large systems.
- 79Database replication uses master-slave architecture to copy data to multiple servers for redundancy and high_____.
Hint
The system should remain accessible when a server fails.
Answer
availability
Explanation
Database replication provides redundancy and high availability; if one server fails, the system can switch to a replica.
- 80In load balancing, the master distributes incoming_____across several servers.
Hint
This helps prevent any one server from becoming overloaded.
Answer
traffic
Explanation
Load balancing is an example in which a master distributes incoming traffic among several servers.
- 81In broker architecture, clients and servers communicate through a central_____rather than interacting directly.
Hint
It connects parties like an intermediary in a marketplace.
Answer
broker
Explanation
The broker receives requests from clients and routes them to the appropriate servers, decoupling the participants.
- 82A broker routes client requests to the appropriate_____for processing.
Hint
These components handle the requested work.
Answer
servers
Explanation
The broker acts as a central hub that directs requests to the right servers for processing.
- 83Broker architecture is flexible because servers can be added or removed without disrupting the_____system.
Hint
The broker helps preserve the operation of the complete arrangement.
Answer
whole
Explanation
The broker decouples clients and servers, allowing servers to be added or removed without disrupting the whole system.
- 84A broker can improve fault tolerance by redirecting requests if a_____fails.
Hint
The request can be routed elsewhere when this component is unavailable.
Answer
server
Explanation
The broker can redirect requests when a server fails, improving fault tolerance.
- 85If the broker itself fails without suitable failover mechanisms, it can become a single point of_____.
Hint
The central intermediary may be a dependency for the whole system.
Answer
failure
Explanation
The broker must be designed with failover mechanisms because its own failure can affect the system as a whole.
- 86Broker implementations require careful design of routing logic, load balancing, and_____.
Hint
These measures protect the broker and the communication it coordinates.
Answer
security measures
Explanation
The content identifies routing logic, load balancing, and security measures as concerns when implementing a broker.
- 87Message brokers such as RabbitMQ and Apache Kafka allow messages to be exchanged between applications or_____.
Hint
These are the other software components that communicate through the broker.
Answer
services
Explanation
Message brokers facilitate message exchange between different applications or services.
- 88In Blackboard architecture, specialized modules collaborate by reading and writing information on a central_____.
Hint
It is the shared board on which problem information is collected.
Answer
Blackboard
Explanation
The Blackboard is a central data store where specialized modules contribute information and insights.
- 89Blackboard architecture is useful when a solution emerges gradually from uncertain or_____data.
Hint
The available information may not yet form a complete picture.
Answer
incomplete
Explanation
The pattern suits problems involving uncertain or incomplete data, where a solution develops as modules contribute.
- 90In a speech recognition system using Blackboard architecture, different modules can analyze audio, identify phones, match words, and interpret_____.
Hint
This is the understanding derived from the recognized words.
Answer
meaning
Explanation
Speech recognition is an example in which modules contribute different analyses to the central Blackboard, including interpretation of meaning.
- 91When many Blackboard modules contribute at once, data must be kept consistent and_____.
Hint
The shared information must stay coordinated over time.
Answer
synchronized
Explanation
Managing a central Blackboard can be complex; consistency and synchronization help avoid conflicts and support sound solutions.
- 92Blackboard modules work_____through the shared board rather than needing to solve the problem through direct collaboration.
Hint
They contribute to and use a common store instead of coordinating only through direct exchanges.
Answer
indirectly
Explanation
Specialized modules work indirectly through the Blackboard, each contributing its part to the solution.
- 93The Interpreter pattern defines a grammatical representation for a specific language and provides an interpreter to process and_____its instructions.
Hint
The interpreter carries out the meaning of the instructions.
Answer
execute
Explanation
The pattern represents a language’s grammar and processes and executes instructions written in that language.
- 94A programming language interpreter translates human-readable code into instructions the computer can understand and_____.
Hint
The computer does more than understand the translated instructions; it carries them out.
Answer
execute
Explanation
The content uses Python and JavaScript as examples of languages whose code an interpreter processes into instructions the computer can execute.
- 95The Interpreter pattern is useful for implementing a domain-specific or_____language.
Hint
This kind of language can express specialized logic or tasks.
Answer
scripting
Explanation
The pattern is useful when creating a domain-specific language or a scripting language for particular logic.
- 96In a business rule engine, an interpreter can evaluate rules written in a specialized language against_____.
Hint
The rules are applied to the information the application is handling.
Answer
the data
Explanation
A business application can use a specialized language to define rules and an interpreter to evaluate those rules against the data.
- 97In MVC, the model represents the application’s data and_____.
Hint
It contains the information and underlying behavior of the application.
Answer
logic
Explanation
The model represents the data and logic of the application.
- 98In MVC, the controller handles user input and updates the_____.
Hint
It changes the application’s data and logic in response to user actions.
Answer
model
Explanation
The controller handles user input and updates the model.
- 99In MVC, the view displays information to the_____.
Hint
It is the presentation part of the application.
Answer
user
Explanation
The view displays information to the user, while the model holds data and logic and the controller handles input.
- 100Separating responsibilities in MVC helps make code more reusable, simplifies testing, and makes applications easier to_____.
Hint
Changes can be made with less risk of a domino effect.
Answer
update
Explanation
MVC separates concerns, supports code reuse and testing, and makes updating an application easier without causing cascading changes.
- 101For very large applications with many views and controllers, MVC can become_____.
Hint
The number of components can make the pattern harder to manage.
Answer
complex
Explanation
Although MVC is powerful and popular, it can become complex in very large applications with many views and controllers.
- 102For a simple application, MVC may be_____because it adds unnecessary overhead.
Hint
The pattern may be more structure than the project needs.
Answer
overkill
Explanation
For a simple application, MVC can add unnecessary overhead and may be more than the project requires.
- 103The repository pattern mediates between an application’s domain logic and its data access_____.
Hint
It sits between core application logic and data storage operations.
Answer
layer
Explanation
A repository acts as an intermediary between the domain logic and the data access layer.
- 104A repository provides a clean interface for retrieving and_____data.
Hint
The application uses the interface both to obtain and to save information.
Answer
persisting
Explanation
The repository provides an interface for retrieving and persisting data while hiding data-store details.
- 105The repository pattern hides the complexity of the underlying database or data_____.
Hint
This is the system where information is kept.
Answer
store
Explanation
The repository hides the complexity of the underlying database or data store from the rest of the application.
- 106Because the repository isolates data access, changing the database may require updating the repository without changing the rest of the_____.
Hint
The repository limits how far a data-storage change must spread.
Answer
application
Explanation
The pattern promotes loose coupling; changes to the database or data access logic can be localized to the repository.
- 107The Strategy pattern defines a family of algorithms, encapsulates each one, and makes them_____.
Hint
One approach can be swapped for another as needed.
Answer
interchangeable
Explanation
The pattern allows algorithms to be exchanged according to the situation or user’s needs.
- 108A navigation app can use the Strategy pattern to switch among routing algorithms for shortest distance, fastest travel time, or avoiding_____.
Hint
This route preference avoids a particular kind of road charge.
Answer
tolls
Explanation
The navigation example selects among routing strategies based on the user’s preferences, including avoiding tolls.
- 109The Strategy pattern supports code reuse by allowing algorithms to be used in different parts of an application or in different_____.
Hint
The algorithms may be reused beyond a single program.
Answer
applications
Explanation
The content notes that algorithms can be reused in different parts of an application or across different applications.
- 110Since each algorithm can be tested independently, the Strategy pattern can make_____easier.
Hint
This is the process of checking whether the algorithms work correctly.
Answer
testing
Explanation
Encapsulating algorithms separately allows each one to be tested independently.
- 111The Strategy pattern makes an application more extensible because new algorithms can be added without changing the_____code.
Hint
New options can be added while leaving what is already there alone.
Answer
existing
Explanation
New algorithms can be added without changing existing code, making the application more extensible.
- 112If there are only one or two simple algorithms, using the Strategy pattern may add unnecessary_____.
Hint
A flexible structure can be excessive for a very small problem.
Answer
complexity
Explanation
The pattern may be overkill when there are only one or two simple algorithms, or when separating very similar algorithms is not worth the effort.

Ask anything
We've read this whole study set, so questions about it get the best answers.