From c9dbbbf82277036d15a180b0e8609b6dfccb50bd Mon Sep 17 00:00:00 2001 From: WillemDalton Date: Mon, 29 Sep 2025 18:26:42 -0400 Subject: progress on implementing strategy pattern --- src/main/java/design/model/Course.java | 45 ---------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/main/java/design/model/Course.java (limited to 'src/main/java/design/model/Course.java') diff --git a/src/main/java/design/model/Course.java b/src/main/java/design/model/Course.java deleted file mode 100644 index 5f8c43d..0000000 --- a/src/main/java/design/model/Course.java +++ /dev/null @@ -1,45 +0,0 @@ -package design.model; - -import java.util.List; - -public class Course { - private final String name; - private final int difficultyRating; - private final String location; - private final int holeCount; - private final int totalPar; - private final List holes; - - public Course(String name, int difficultyRating, String location, int holeCount, int totalPar, List holes) { - this.name = name; - this.difficultyRating = difficultyRating; - this.location = location; - this.holeCount = holeCount; - this.totalPar = totalPar; - this.holes = holes; - } - - public String getName() { - return name; - } - - public int getDifficultyRating() { - return difficultyRating; - } - - public String getLocation() { - return location; - } - - public int getHoleCount() { - return holeCount; - } - - public int getTotalPar() { - return totalPar; - } - - public List getHoles() { - return holes; - } -} -- cgit v1.2.3 From e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3 Mon Sep 17 00:00:00 2001 From: WillemDalton Date: Thu, 2 Oct 2025 08:55:33 -0400 Subject: more progress on the strategy, unit testing --- src/main/java/design/model/Course.java | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/main/java/design/model/Course.java (limited to 'src/main/java/design/model/Course.java') diff --git a/src/main/java/design/model/Course.java b/src/main/java/design/model/Course.java new file mode 100644 index 0000000..8dfecd8 --- /dev/null +++ b/src/main/java/design/model/Course.java @@ -0,0 +1,45 @@ +package design.model; + +import java.util.List; + +public class Course implements ICourse { + private final String name; + private final int difficultyRating; + private final String location; + private final int holeCount; + private final int totalPar; + private final List holes; + + public Course(String name, int difficultyRating, String location, int holeCount, int totalPar, List holes) { + this.name = name; + this.difficultyRating = difficultyRating; + this.location = location; + this.holeCount = holeCount; + this.totalPar = totalPar; + this.holes = holes; + } + + public String getName() { + return name; + } + + public float getDifficultyRating() { + return difficultyRating; + } + + public String getLocation() { + return location; + } + + public int getHoleCount() { + return holeCount; + } + + public int getTotalPar() { + return totalPar; + } + + public List getHoles() { + return holes; + } +} -- cgit v1.2.3