#107 JavaDoc for Servant

This commit is contained in:
Ilkka Seppala 2015-08-21 22:54:18 +03:00
parent ace8b3e22f
commit 1b2a1fd19f
6 changed files with 47 additions and 14 deletions

View File

@ -10,9 +10,14 @@ import java.util.ArrayList;
* *
*/ */
public class App { public class App {
static Servant jenkins = new Servant("Jenkins"); static Servant jenkins = new Servant("Jenkins");
static Servant travis = new Servant("Travis"); static Servant travis = new Servant("Travis");
/**
* Program entry point
* @param args
*/
public static void main(String[] args) { public static void main(String[] args) {
scenario(jenkins, 1); scenario(jenkins, 1);
scenario(travis, 0); scenario(travis, 0);

View File

@ -1,6 +1,12 @@
package com.iluwatar.servant; package com.iluwatar.servant;
/**
*
* King
*
*/
public class King implements Royalty { public class King implements Royalty {
private boolean isDrunk; private boolean isDrunk;
private boolean isHungry = true; private boolean isHungry = true;
private boolean isHappy; private boolean isHappy;

View File

@ -1,6 +1,12 @@
package com.iluwatar.servant; package com.iluwatar.servant;
/**
*
* Queen
*
*/
public class Queen implements Royalty { public class Queen implements Royalty {
private boolean isDrunk = true; private boolean isDrunk = true;
private boolean isHungry; private boolean isHungry;
private boolean isHappy; private boolean isHappy;

View File

@ -1,5 +1,10 @@
package com.iluwatar.servant; package com.iluwatar.servant;
/**
*
* Royalty
*
*/
interface Royalty { interface Royalty {
void getFed(); void getFed();

View File

@ -2,7 +2,13 @@ package com.iluwatar.servant;
import java.util.ArrayList; import java.util.ArrayList;
/**
*
* Servant
*
*/
public class Servant { public class Servant {
public String name; public String name;
public Servant(String name){ public Servant(String name){

View File

@ -1,14 +1,19 @@
package com.iluwatar.servant; package com.iluwatar.servant;
import org.junit.Test; import org.junit.Test;
import com.iluwatar.servant.App; import com.iluwatar.servant.App;
public class AppTest { /**
*
@Test * Application test
public void test() { *
String[] args = {}; */
App.main(args); public class AppTest {
}
} @Test
public void test() {
String[] args = {};
App.main(args);
}
}