summaryrefslogtreecommitdiff
path: root/src/main/java/design/model/Course.java
blob: c1995637b7b687d1116c3d6fb9c4898748dea86e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package design.model;

import design.model.course_search.CourseList;
import design.model.course_search.ICourse;

import java.util.List;

public class Course implements ICourse {

    private final int id;
    private final String name;
    private final int difficultyRating;
    private final String location;
    private final int holeCount;
    private final int totalPar;
    private final List<Hole> holes;

    public Course(int id, String name, int difficultyRating, String location, int holeCount, int totalPar, List<Hole> holes) {
        this.id = id;
        this.name = name;
        this.difficultyRating = difficultyRating;
        this.location = location;
        this.holeCount = holeCount;
        this.totalPar = totalPar;
        this.holes = holes;
    }
    
    public int getId() {
        return id;
    }
    
    @Override
    public String getName() {
        return name;
    }
    
    @Override
    public float getDifficultyRating() {
        return difficultyRating;
    }
    
    @Override
    public String getLocation() {
        return location;
    }
    
    @Override   
    public int getHoleCount() {
        return holeCount;
    }
    
    @Override
    public int getTotalPar() {
        return totalPar;
    }
    
    @Override
    public List<Hole> getHoles() {
        return holes;
    }
    
    @Override
    public String toString() {
        return name + ", " + location + ", " + difficultyRating + ", " + holeCount + ", " + totalPar;
    }
}