#107 JavaDoc for Servant
This commit is contained in:
parent
ace8b3e22f
commit
1b2a1fd19f
@ -10,9 +10,14 @@ import java.util.ArrayList;
|
||||
*
|
||||
*/
|
||||
public class App {
|
||||
|
||||
static Servant jenkins = new Servant("Jenkins");
|
||||
static Servant travis = new Servant("Travis");
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
scenario(jenkins, 1);
|
||||
scenario(travis, 0);
|
||||
|
@ -1,6 +1,12 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
/**
|
||||
*
|
||||
* King
|
||||
*
|
||||
*/
|
||||
public class King implements Royalty {
|
||||
|
||||
private boolean isDrunk;
|
||||
private boolean isHungry = true;
|
||||
private boolean isHappy;
|
||||
|
@ -1,6 +1,12 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
/**
|
||||
*
|
||||
* Queen
|
||||
*
|
||||
*/
|
||||
public class Queen implements Royalty {
|
||||
|
||||
private boolean isDrunk = true;
|
||||
private boolean isHungry;
|
||||
private boolean isHappy;
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
/**
|
||||
*
|
||||
* Royalty
|
||||
*
|
||||
*/
|
||||
interface Royalty {
|
||||
|
||||
void getFed();
|
||||
|
@ -2,7 +2,13 @@ package com.iluwatar.servant;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
* Servant
|
||||
*
|
||||
*/
|
||||
public class Servant {
|
||||
|
||||
public String name;
|
||||
|
||||
public Servant(String name){
|
||||
|
@ -1,14 +1,19 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.iluwatar.servant.App;
|
||||
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
}
|
||||
}
|
||||
package com.iluwatar.servant;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.iluwatar.servant.App;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user