-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.java
More file actions
55 lines (45 loc) · 1.04 KB
/
Player.java
File metadata and controls
55 lines (45 loc) · 1.04 KB
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
import java.io.Serializable;
public class Player implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
private String team;
private int runs;
private int sixes;
private int fours;
private int wickets;
private int runsConceded;
public Player(String name, String team) {
this.name = name;
this.team = team;
}
public String getName() {
return name;
}
public String getTeamName(){
return team;
}
public int getRuns() {
return runs;
}
public int getSixes(){
return sixes;
}
public int getFours(){
return fours;
}
public void addRuns(int runs) {
this.runs += runs;
}
public int getWickets() {
return wickets;
}
public void addWickets(int wkts) {
this.wickets += wkts;
}
public int getRunsConceded() {
return runsConceded;
}
public void addRunsConceded(int runs) {
this.runsConceded += runs;
}
}