-
Notifications
You must be signed in to change notification settings - Fork 2
/
Pertandingan.java
94 lines (89 loc) · 2.15 KB
/
Pertandingan.java
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import java.util.Date;
public class Pertandingan {
private boolean played;
private Club teamHome;
private Club teamAway;
private int teamHomeScore;
private int teamAwayScore;
private Date date;
/**
* method untuk mendapatkan nilai true atau false(main atau tidak)
* @return played
*/
public boolean getplayed(){
return played;
}
/**
*
* @param play
*/
public void setplayed(boolean play){
this.played = play;
}
/**
* method getter untuk mendapatkan nilai dari tim home
* @return teamhome
*/
public Club getteamHome() {
return teamHome;
}
/**
* method getter untuk mendapatkan nilai dari team away
* @return teamAway
*/
public Club getteamAway() {
return teamAway;
}
/**
* method getter untuk mendapatkan nilai dari skor team home
* @return teamHomeScore
*/
public int getteamHomeScore(){
return teamHomeScore;
}
/**
* method getter untuk mendapatka nilai dari skor team away
* @return teamAwayScore
*/
public int getteamAwayScore(){
return teamAwayScore;
}
public Date getDate() {
return date;
}
/**
* method setter untuk mengubah team home
* @param teamHome
*/
public void setteamHome(Club teamHome) {
this.teamHome = teamHome;
}
/**
* method setter untuk mengubah team away
* @param teamAway
*/
public void setteamAway(Club teamAway) {
this.teamAway = teamAway;
}
/**
* method setter untuk mengubah score team home
* @param teamHomeScore
*/
public void setteamHomeScore(int teamHomeScore) {
this.teamHomeScore = teamHomeScore;
}
/**
* method setter untuk mengubah score team away
* @param teamAwayScore
*/
public void setteamAwayScore(int teamAwayScore) {
this.teamAwayScore = teamAwayScore;
}
/**
* Method untuk menampilkan objek team home vs team away
* @return string
*/
public String toString(){
return getteamHome()+"[vs]"+getteamAway();
}
}