File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
slides/src/Slides/Lessons Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,10 @@ function Lesson17() {
5959 < p > According to the principle of < em > single responsibility</ em > , a class should only have one reason to change</ p >
6060 </ section >
6161 < section >
62- < p > The < em > dependency inversion</ em > principle suggests that we should make our class accept an < em > Engine</ em > as a < i > dependency</ i > </ p >
62+ < p > The < em > dependency inversion</ em > principle suggests that we should make our class depend on abstractions, and not concrete classes</ p >
63+ </ section >
64+ < section >
65+ < p > For example, our < em > Car</ em > class should depend on an < em > Engine</ em > interface instead of a concrete < em > GasEngine</ em > class</ p >
6366 </ section >
6467 < section class ="ml-bullet-slide ">
6568 < h3 > Where we're going next</ h3 >
You can’t perform that action at this time.
0 commit comments