File tree Expand file tree Collapse file tree
main/java/com/iluwatar/servant
test/java/com/iluwatar/servant Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 *
1111 */
1212public class App {
13+
1314 static Servant jenkins = new Servant ("Jenkins" );
1415 static Servant travis = new Servant ("Travis" );
1516
17+ /**
18+ * Program entry point
19+ * @param args
20+ */
1621 public static void main (String [] args ) {
1722 scenario (jenkins , 1 );
1823 scenario (travis , 0 );
Original file line number Diff line number Diff line change 11package com .iluwatar .servant ;
22
3+ /**
4+ *
5+ * King
6+ *
7+ */
38public class King implements Royalty {
9+
410 private boolean isDrunk ;
511 private boolean isHungry = true ;
612 private boolean isHappy ;
Original file line number Diff line number Diff line change 11package com .iluwatar .servant ;
22
3+ /**
4+ *
5+ * Queen
6+ *
7+ */
38public class Queen implements Royalty {
9+
410 private boolean isDrunk = true ;
511 private boolean isHungry ;
612 private boolean isHappy ;
Original file line number Diff line number Diff line change 11package com .iluwatar .servant ;
22
3+ /**
4+ *
5+ * Royalty
6+ *
7+ */
38interface Royalty {
49
510 void getFed ();
Original file line number Diff line number Diff line change 22
33import java .util .ArrayList ;
44
5+ /**
6+ *
7+ * Servant
8+ *
9+ */
510public class Servant {
11+
612 public String name ;
713
814 public Servant (String name ){
Original file line number Diff line number Diff line change 1- package com .iluwatar .servant ;
2-
3- import org .junit .Test ;
4-
5- import com .iluwatar .servant .App ;
6-
7- public class AppTest {
8-
9- @ Test
10- public void test () {
11- String [] args = {};
12- App .main (args );
13- }
14- }
1+ package com .iluwatar .servant ;
2+
3+ import org .junit .Test ;
4+
5+ import com .iluwatar .servant .App ;
6+
7+ /**
8+ *
9+ * Application test
10+ *
11+ */
12+ public class AppTest {
13+
14+ @ Test
15+ public void test () {
16+ String [] args = {};
17+ App .main (args );
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments