Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. /*
  2. Pontus Eklund
  3. poek1067
  4. */
  5. public class Participant {
  6. private String name;
  7. private String surName;
  8. private static int number = 99;
  9. private int instanceStartNum = number++;
  10. private String team;
  11.  
  12. public Participant(String name,String surName, String team) {
  13. this.name = name;
  14. this.surName = surName;
  15. this.team = team;
  16. this.instanceStartNum = instanceStartNum;
  17. }
  18. public String getFirstName() {
  19. return this.name;
  20. }
  21.  
  22. public String getSurName() {
  23. return this.surName;
  24. }
  25.  
  26. public String getFullName() {
  27. return this.name + this.surName;
  28. }
  29.  
  30. public int getNumber() {
  31. return this.instanceStartNum;
  32. }
  33.  
  34. public String getTeam() {
  35. return this.team;
  36. }
  37.  
  38.  
  39. public String toString() {
  40. return this.name + " " + this.surName + " " + this.instanceStartNum + " " + this.team;
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement