From 5f37a3a97b7afef71f3edb77ffc34d30b9c6a007 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Wed, 14 Feb 2024 12:46:49 -0500 Subject: [PATCH] Added JavaDocs to Coin/Fake classes. --- src/Practice/Decrease_Conquer/FakeCoin.java | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/Practice/Decrease_Conquer/FakeCoin.java b/src/Practice/Decrease_Conquer/FakeCoin.java index 55bedfb..9ccbd4a 100644 --- a/src/Practice/Decrease_Conquer/FakeCoin.java +++ b/src/Practice/Decrease_Conquer/FakeCoin.java @@ -82,16 +82,49 @@ public class FakeCoin extends Application { } + /** + * This class is used to keep a list of Coins. + * + * @author Jonathan Turner + * @version Spring 2024 + */ private static class Coin { + public int weight; public int location; + + /** + * Creates a new coin with a default weight and location. + * + * @precondition none + * @postcondition a coin is created + * + * @param location the coins location + */ public Coin(int location) { this.weight = 3; this.location = location; } } + /** + * This class is used to track the fake coin.. + * + * @author Jonathan Turner + * @version Spring 2024 + */ private static class Fake extends Coin { + + /** + * Creates a fake coin with a specified weight of lighter or heavier than + * a regular coin. + * + * @precondition none + * @postcondition a coin is created + * + * @param location the location of the fake coin + * @param isLighter if it is lighter or not. + */ public Fake(int location, boolean isLighter) { super(location); if (isLighter)