added facade sample

This commit is contained in:
Ilkka Seppala
2014-08-13 22:19:28 +03:00
parent dcf82b01c6
commit 8725969908
8 changed files with 160 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
package com.iluwatar;
public abstract class DwarvenMineWorker {
public void goToSleep() {
System.out.println(name() + " goes to sleep.");
}
public void wakeUp() {
System.out.println(name() + " wakes up.");
}
public void goHome() {
System.out.println(name() + " goes home.");
}
public void goToMine() {
System.out.println(name() + " goes to the mine.");
}
public abstract void work();
public abstract String name();
}