-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriver.java
More file actions
48 lines (34 loc) · 1007 Bytes
/
Copy pathDriver.java
File metadata and controls
48 lines (34 loc) · 1007 Bytes
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
public class Driver {
private String name;
private String team;
private double podiums;
private double wins;
private double champPoints;
public Driver(String name, String team, double podiums, double wins, double champPoints) {
this.name = name;
this.team = team;
this.podiums = podiums;
this.wins = wins;
this.champPoints = champPoints;
}
public String getName() {
return name;
}
public String getTeam() {
return team;
}
public double getPodiums() {
return podiums;
}
public double getWins() {
return wins;
}
public double getChampPoints() {
return champPoints;
}
@Override
public String toString() {
return "Driver " + name + ", for " + team + ", with " +podiums+ " podiums, "
+wins+ " race wins and "+champPoints+" Championship Points";
}
}