1 25 package org.objectweb.speedo.pobjects.detach; 26 27 30 public class Player { 31 32 protected String name; 33 protected Team team; 34 protected int age; 35 36 public Player(String name, Team team, int age){ 37 this.name = name; 38 this.team = team; 39 this.age = age; 40 } 41 42 public int getAge() { 43 return age; 44 } 45 46 public String getName() { 47 return name; 48 } 49 50 public Team getTeam() { 51 return team; 52 } 53 54 public void setAge(int i) { 55 age = i; 56 } 57 58 public void setName(String string) { 59 name = string; 60 } 61 62 public void setTeam(Team team) { 63 this.team = team; 64 } 65 66 public String toString(){ 67 return "Player[" + name + ", " + age + ", " + team.getTown() +" ]"; 68 } 69 } 70 | Popular Tags |