diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Q10/TrainTimeTable.java | 7 | ||||
| -rw-r--r-- | src/Q5/ComputeIntellect.java | 3 | ||||
| -rw-r--r-- | src/Q5/Village.java | 7 | ||||
| -rw-r--r-- | src/Q6/WeekDay.java | 3 | ||||
| -rw-r--r-- | src/Q7/Person.java | 3 | ||||
| -rw-r--r-- | src/Q9/Robot.java | 2 |
6 files changed, 17 insertions, 8 deletions
diff --git a/src/Q10/TrainTimeTable.java b/src/Q10/TrainTimeTable.java index 201f7d2..da55690 100644 --- a/src/Q10/TrainTimeTable.java +++ b/src/Q10/TrainTimeTable.java @@ -21,8 +21,9 @@ public class TrainTimeTable { /** * An overloaded constructor to allow injections of each of the stations in the schedule. + * * @param schedule the list of stations - * */ + */ public TrainTimeTable(LinkedList<Station> schedule) { this.schedule = schedule; } @@ -52,6 +53,7 @@ public class TrainTimeTable { /** * An overload of displaySchedule that accepts a PrintStream to write output to different * printers. + * * @param out the output stream to write to */ public void displaySchedule(PrintStream out) { @@ -78,8 +80,9 @@ public class TrainTimeTable { /** * This is the main entry point to the console application. + * * @param args the argument vector to passed to the program. - * */ + */ public static void main(String[] args) { System.out.println("=== Question 10 ==="); LinkedList<Station> stations = diff --git a/src/Q5/ComputeIntellect.java b/src/Q5/ComputeIntellect.java index 54ca2fb..64d5a07 100644 --- a/src/Q5/ComputeIntellect.java +++ b/src/Q5/ComputeIntellect.java @@ -55,8 +55,9 @@ public class ComputeIntellect { /** * Tallys the # of citizens with different educational qualifications. + * * @param citizens the array of citizens to tally. - * */ + */ public void distributionOfQualification(Citizen[] citizens) { for (Citizen citizen : citizens) switch (citizen.getEducationalQualification()) { diff --git a/src/Q5/Village.java b/src/Q5/Village.java index fba9c8a..abe0d0c 100644 --- a/src/Q5/Village.java +++ b/src/Q5/Village.java @@ -22,6 +22,7 @@ public class Village { /** * Creates an instance of a village with specific villagers. + * * @param citizens the list of citizens in the village */ public Village(List<Citizen> citizens) { @@ -35,8 +36,9 @@ public class Village { /** * 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)); } @@ -53,8 +55,9 @@ public class Village { /** * 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(); diff --git a/src/Q6/WeekDay.java b/src/Q6/WeekDay.java index 7ef1082..73a9cb0 100644 --- a/src/Q6/WeekDay.java +++ b/src/Q6/WeekDay.java @@ -56,8 +56,9 @@ public class WeekDay { /** * 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); diff --git a/src/Q7/Person.java b/src/Q7/Person.java index 8992197..71f10a2 100644 --- a/src/Q7/Person.java +++ b/src/Q7/Person.java @@ -132,8 +132,9 @@ public class Person { /** * The entry point to the console application. + * * @param args the argument vector passed to the program. - **/ + */ public static void main(String[] args) { ArrayList<Person> people = new ArrayList<Person>(); people.add(new Person("Andrew", 125.5, 55.1)); diff --git a/src/Q9/Robot.java b/src/Q9/Robot.java index 6f9d2c0..330b10e 100644 --- a/src/Q9/Robot.java +++ b/src/Q9/Robot.java @@ -70,7 +70,7 @@ public class Robot { * @param x the x coordinate * @param y the y coordinate * @return true if the robot is at the given coordinate - * */ + */ public boolean atPosition(int x, int y) { return getX() == x && getY() == y; } |
