#107 JavaDoc for Servant
This commit is contained in:
		| @@ -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){ | ||||
|   | ||||
| @@ -4,6 +4,11 @@ import org.junit.Test; | ||||
|  | ||||
| import com.iluwatar.servant.App; | ||||
|  | ||||
| /** | ||||
|  *  | ||||
|  * Application test | ||||
|  * | ||||
|  */ | ||||
| public class AppTest { | ||||
|  | ||||
| 	@Test | ||||
|   | ||||
		Reference in New Issue
	
	Block a user