0
0
Software Engineeringknowledge~10 mins

SOLID principles 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 SOLID principle that states a class should have only one reason to change.

Software Engineering
The [1] principle means a class should have only one reason to change.
Drag options to blanks, or click blank then click option'
ASingle Responsibility
BLiskov Substitution
COpen/Closed
DDependency Inversion
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Single Responsibility with Open/Closed principle.
Thinking it relates to inheritance or dependencies.
2fill in blank
medium

Complete the sentence to describe the Open/Closed principle.

Software Engineering
The Open/Closed principle means software entities should be open for [1] but closed for [2].
Drag options to blanks, or click blank then click option'
Amodification
Babstraction
Cinheritance
Dextension
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'modification' for both blanks.
Confusing extension with inheritance.
3fill in blank
hard

Fix the error in the description of the Liskov Substitution principle.

Software Engineering
The Liskov Substitution principle means that objects of a superclass should be replaceable with objects of a [1] without affecting the correctness of the program.
Drag options to blanks, or click blank then click option'
Aunrelated class
Bdifferent class
Csubclass
Dparent class
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing unrelated or different classes instead of subclasses.
Misunderstanding the concept as unrelated to inheritance.
4fill in blank
hard

Fill both blanks to complete the Dependency Inversion principle statement.

Software Engineering
High-level modules should not depend on [1] modules. Both should depend on [2].
Drag options to blanks, or click blank then click option'
Alow-level
Bconcrete
Cabstractions
Dinterfaces
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing concrete with abstractions.
Thinking high-level depends directly on concrete modules.
5fill in blank
hard

Fill all three blanks to complete the statement about the Interface Segregation principle.

Software Engineering
Clients should not be forced to depend on interfaces they do not [1]. Instead, many client-specific [2] are better than one general [3].
Drag options to blanks, or click blank then click option'
Aimplement
Binterfaces
Cinterface
Dinherit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'inherit' instead of 'implement'.
Confusing interface (singular) with interfaces (plural).