X Tutup
Skip to content

Commit 1b2a1fd

Browse files
committed
iluwatar#107 JavaDoc for Servant
1 parent ace8b3e commit 1b2a1fd

File tree

6 files changed

+47
-14
lines changed

6 files changed

+47
-14
lines changed

servant/src/main/java/com/iluwatar/servant/App.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
*
1111
*/
1212
public 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);

servant/src/main/java/com/iluwatar/servant/King.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package com.iluwatar.servant;
22

3+
/**
4+
*
5+
* King
6+
*
7+
*/
38
public class King implements Royalty {
9+
410
private boolean isDrunk;
511
private boolean isHungry = true;
612
private boolean isHappy;

servant/src/main/java/com/iluwatar/servant/Queen.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package com.iluwatar.servant;
22

3+
/**
4+
*
5+
* Queen
6+
*
7+
*/
38
public class Queen implements Royalty {
9+
410
private boolean isDrunk = true;
511
private boolean isHungry;
612
private boolean isHappy;

servant/src/main/java/com/iluwatar/servant/Royalty.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar.servant;
22

3+
/**
4+
*
5+
* Royalty
6+
*
7+
*/
38
interface Royalty {
49

510
void getFed();

servant/src/main/java/com/iluwatar/servant/Servant.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
import java.util.ArrayList;
44

5+
/**
6+
*
7+
* Servant
8+
*
9+
*/
510
public class Servant {
11+
612
public String name;
713

814
public Servant(String name){
Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
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+
}

0 commit comments

Comments
 (0)
X Tutup