diff options
Diffstat (limited to 'src/Q8/Point.java')
| -rw-r--r-- | src/Q8/Point.java | 24 |
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": |
