We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2116191 commit 965b777Copy full SHA for 965b777
Roadmap/28 - SOLID LSP/javascript/caterinarodriguezdev.js
@@ -15,12 +15,24 @@
15
*/
16
17
class Ball {
18
+ bounce() {
19
+ console.log(`The ball bounce!!!`);
20
+ }
21
+}
22
+
23
+class BowlingBall extends Ball {
24
25
+ throw new Error(`Bowling ball can't bounce!!!`)
26
27
28
29
+class BallLSP {
30
throw() {
31
console.log(`Throw the ball`);
32
}
33
34
-class BowlingBall extends Ball {
35
+class BowlingBallLSP extends Ball {
36
37
console.log(`Throw the ball toward pins`);
38
0 commit comments