Commit 0132122

mokha <mokha@cisco.com>
2019-05-09 00:32:08
add documentation
1 parent 900b22d
Changed files (2)
src/Q6/Triangle.java
@@ -1,7 +1,7 @@
 /**
  * Assignment 1, COMP268 Class: Triangle.java
  *
- * @description Represents an employee savings account.
+ * @description Represents a Triangle
  * @author: mo khan Student ID: 3431709
  * @date May 8, 2019
  * @version 1.0
src/Q7/HailstoneSequence.java
@@ -1,12 +1,33 @@
+/**
+ * Assignment 1, COMP268 Class: HailstoneSequence.java
+ *
+ * @description Represents a hailstone sequence
+ * @author: mo khan Student ID: 3431709
+ * @date May 8, 2019
+ * @version 1.0
+ */
 package Q7;
 
 import java.util.ArrayList;
 
 public class HailstoneSequence {
+  /**
+   * Returns a hailstone sequence using the seed provided.
+   *
+   * @param n the seed value for the hailstone sequence
+   * @return a list of integers that represents the hailstone sequence.
+   */
   public static ArrayList<Integer> getHailstoneSequence(int n) {
     return getHailstoneSequence(n, new ArrayList<Integer>());
   }
 
+  /**
+   * Appends to the hailstone sequence starting from the seed value provided.
+   *
+   * @param n the seed value for the hailstone sequence
+   * @param items the list of items to append the next set of hailstone sequence to.
+   * @return a list of integers that represents the hailstone sequence.
+   */
   public static ArrayList<Integer> getHailstoneSequence(int n, ArrayList<Integer> items) {
     items.add(n);