summaryrefslogtreecommitdiff
path: root/src/Q8/Point.java
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2019-08-11 17:36:23 -0600
committermo khan <mo@mokhan.ca>2019-08-11 17:36:23 -0600
commita04f5ec262de028c843e38bf5864cd84953258b1 (patch)
tree7bf48bdc89f0b94e783a0bfeef06b284466832da /src/Q8/Point.java
parentcebbb584d3ec256dea468e73cec5d8a30d3151d9 (diff)
add documentation
Diffstat (limited to 'src/Q8/Point.java')
-rw-r--r--src/Q8/Point.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Q8/Point.java b/src/Q8/Point.java
index 4b0b86e..391ea28 100644
--- a/src/Q8/Point.java
+++ b/src/Q8/Point.java
@@ -1,3 +1,11 @@
+/**
+ * Assignment 2, COMP268 Class: Point.java
+ *
+ * @description A class used to represent a point for a single round.
+ * @author: mo khan Student ID: 3431709
+ * @date August 3, 2019
+ * @version 1.0
+ */
package Q8;
public class Point {
@@ -7,20 +15,36 @@ public class Point {
private int score;
private String stroke;
+ /**
+ * Creates an instance of a Point.
+ *
+ * @param player the numeric identifer to identify the player that received the point.
+ * @param stroke the name of the stroke that was used to score the point.
+ * @param score the current score for the player who earned the point.
+ */
public Point(int player, String stroke, int score) {
this.player = player;
this.stroke = stroke;
this.score = score;
}
+ /**
+ * @return the player that scored the point.
+ */
public int getPlayer() {
return this.player;
}
+ /**
+ * @return the score for the player at the time the point was scored.
+ */
public int getScore() {
return this.score;
}
+ /**
+ * @return the stroke used to score the point.
+ */
public String getStroke() {
switch (this.stroke) {
case "a":