0
0
Software Engineeringknowledge~10 mins

Structural patterns (Adapter, Decorator, Facade) in Software Engineering - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the main purpose of the Adapter pattern.

Software Engineering
The Adapter pattern is used to [1] incompatible interfaces so they can work together.
Drag options to blanks, or click blank then click option'
Aconvert
Bcombine
Cignore
Dreplace
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Adapter with Decorator or Facade patterns.
2fill in blank
medium

Complete the code to describe the Decorator pattern's function.

Software Engineering
The Decorator pattern allows behavior to be [1] to an object dynamically without affecting other objects.
Drag options to blanks, or click blank then click option'
Aremoved
Bhidden
Ccopied
Dadded
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking it removes or hides behavior instead of adding.
3fill in blank
hard

Fix the error in the description of the Facade pattern.

Software Engineering
The Facade pattern provides a [1] interface to a complex subsystem, making it easier to use.
Drag options to blanks, or click blank then click option'
Adetailed
Bsimplified
Ccomplex
Dhidden
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'detailed' or 'complex' which are opposite of the Facade's purpose.
4fill in blank
hard

Fill both blanks to complete the explanation of Adapter and Decorator patterns.

Software Engineering
Adapter [1] interfaces to make incompatible classes work together, while Decorator [2] new behavior to objects.
Drag options to blanks, or click blank then click option'
Aconverts
Bremoves
Cadds
Dignores
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the roles of Adapter and Decorator.
5fill in blank
hard

Fill all three blanks to complete the summary of the three structural patterns.

Software Engineering
Adapter [1] incompatible interfaces, Decorator [2] behavior dynamically, and Facade [3] complexity with a simple interface.
Drag options to blanks, or click blank then click option'
Aconverts
Badds
Chides
Dremoves
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing hiding complexity with removing it.