diff options
Diffstat (limited to 'src/Q5/Village.java')
| -rw-r--r-- | src/Q5/Village.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Q5/Village.java b/src/Q5/Village.java index 47c6891..fba9c8a 100644 --- a/src/Q5/Village.java +++ b/src/Q5/Village.java @@ -20,7 +20,10 @@ public class Village { this(new ArrayList<Citizen>()); } - /** Creates an instance of a village with specific villagers. */ + /** + * Creates an instance of a village with specific villagers. + * @param citizens the list of citizens in the village + */ public Village(List<Citizen> citizens) { this.citizens = citizens; } @@ -30,7 +33,10 @@ public class Village { return this.citizens.size(); } - /** Adds a citizen to the village with a specific qualification. */ + /** + * Adds a citizen to the village with a specific qualification. + * @param qualification the qualification for the citizen + * */ public void addCitizen(int qualification) { this.citizens.add(new Citizen(Citizen.generateId(), qualification)); } @@ -45,7 +51,10 @@ public class Village { return this.citizens.toArray(new Citizen[this.citizens.size()]); } - /** The entry point to the console application. */ + /** + * The entry point to the console application. + * @param args the argument vector given to the program. + * */ public static void main(String[] args) { Scanner in = new Scanner(System.in); Village village = new Village(); |
