-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAthletes.java
68 lines (66 loc) · 1.5 KB
/
Athletes.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
import java.io.Serializable;
public class Athletes extends Users implements Serializable{
private String position;
private String current_team;
private double height;
private double weight;
private int likes;
public Athletes(String usern, String p, String c) {
super(usern,p,c);
}
public void setPosition(String p) {
position = p;
}
public String getPosition() {
return position;
}
public void setCurrent_team(String ct) {
current_team = ct;
}
public String getCurrent_team() {
return current_team;
}
public void setHeight(double h) {
height = h;
}
public double getHeight() {
return height;
}
public void setWeight(double w) {
weight = w;
}
public double getWeight() {
return weight;
}
public void edit(int number, String s) {
if (number == 1) {
setName(s);
} else if (number == 3) {
setSport(s);
} else if (number == 4) {
setBio(s);
} else if (number == 5){
setPosition(s);
} else if (number == 6){
setCurrent_team(s);
}
}
public void edit(int number, double d) {
if (number == 7) {
setHeight(d);
} else if (number == 8) {
setWeight(d);
}
}
public void edit(int number, int i) {
if (number == 2) {
setAge(i);
}
}
public int getLikes() {
return likes;
}
public void addLike() {
likes++;
}
}