Commit 6c1fd47
Changed files (6)
src
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 =
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()) {
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();
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);
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));
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;
}