-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerCreation.java
More file actions
27 lines (24 loc) · 869 Bytes
/
Copy pathPlayerCreation.java
File metadata and controls
27 lines (24 loc) · 869 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
public class PlayerCreation{
//iniitalize attributes
public int shooting;
public int passing;
public int dribbling;
public int block;
public int steal;
public int speed;
//create player with given stats
public PlayerCreation(int shooting, int passing, int dribbling, int block, int steal, int speed){
this.shooting = shooting;
this.passing = passing;
this.dribbling = dribbling;
this.block = block;
this.steal = steal;
this.speed = speed;
}
//print each player's stats
public static String toString(String team, int num, int shooting, int passing, int dribbling,
int block, int steal, int speed){
return team + " Player " + num + ": [SH " + shooting + ", PA " + passing
+ ", DR " + dribbling + ", BL " + block + ", ST " + steal + ", SP " + speed + "]";
}
}