update solid ex
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.baeldung.i;
|
||||
|
||||
public class BearCarer implements BearCleaner, BearFeeder {
|
||||
|
||||
public void washTheBear() {
|
||||
//I think we missed a spot..
|
||||
}
|
||||
|
||||
public void feedTheBear() {
|
||||
//Tuna tuesdays..
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.baeldung.i;
|
||||
|
||||
public interface BearCleaner {
|
||||
void washTheBear();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.baeldung.i;
|
||||
|
||||
public interface BearFeeder {
|
||||
void feedTheBear();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.baeldung.i;
|
||||
|
||||
public interface BearKeeper {
|
||||
|
||||
void washTheBear();
|
||||
void feedTheBear();
|
||||
void petTheBear();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.baeldung.i;
|
||||
|
||||
public interface BearPetter {
|
||||
void petTheBear();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.baeldung.i;
|
||||
|
||||
public class CrazyPerson implements BearPetter {
|
||||
|
||||
public void petTheBear() {
|
||||
//Good luck with that!
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user