diff options
| author | WillemDalton <willemhdalton@gmail.com> | 2025-10-02 08:55:33 -0400 |
|---|---|---|
| committer | WillemDalton <willemhdalton@gmail.com> | 2025-10-02 08:55:33 -0400 |
| commit | e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3 (patch) | |
| tree | afc16118dd13e4ab089a85df90be11a80b157fd2 /src/model/Golfer.java | |
| parent | c03d30761e74e27815e6b7639f9ff4ec4e5c185a (diff) | |
| download | designproject-design-6-e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3.tar.gz designproject-design-6-e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3.tar.bz2 designproject-design-6-e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3.zip | |
more progress on the strategy, unit testing
Diffstat (limited to 'src/model/Golfer.java')
| -rw-r--r-- | src/model/Golfer.java | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/model/Golfer.java b/src/model/Golfer.java deleted file mode 100644 index 8f09067..0000000 --- a/src/model/Golfer.java +++ /dev/null @@ -1,66 +0,0 @@ -package design.model; - -import java.util.ArrayList; -import java.util.List; - -public class Golfer { - private String username; - private int passwordHash; - private String fullName; - private final transient List<Course> courses; // might be better to make this like a courseID or something - private final List<Round> rounds; - - public Golfer(String fullName, String username, String password) { - this.courses = new ArrayList<>(); - this.rounds = new ArrayList<>(); - this.fullName = fullName; - this.username = username; - this.passwordHash = password.hashCode(); - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - public void setPassword(String password) { - this.passwordHash = password.hashCode(); - } - - public boolean checkPassword(String password) { - return passwordHash == password.hashCode(); - } - - public Course[] getCourses() { - return courses.toArray(Course[]::new); - } - - public void addCourse(Course course) { - courses.add(course); - } - - public void removeCourse(Course course) { - courses.remove(course); - } - - public Round[] getRounds() { - return rounds.toArray(Round[]::new); - } - - public void addRound(Round round) { - rounds.add(round); - } - - -} |
