1 19 20 package org.polepos.data; 21 22 import org.polepos.framework.*; 23 24 28 public class Pilot implements CheckSummable 29 { 30 private String mName; 31 private String mFirstName; 32 private int mPoints; 33 private int mLicenseID; 34 35 36 39 public Pilot() 40 { 41 } 42 43 44 47 public Pilot(String name, int points) 48 { 49 this.mName=name; 50 this.mPoints=points; 51 } 52 53 56 public Pilot( String name, String firstname, int points, int licenseID ) 57 { 58 mName = name; 59 mFirstName = firstname; 60 mPoints = points; 61 mLicenseID = licenseID; 62 } 63 64 65 public int getPoints() 66 { 67 return mPoints; 68 } 69 70 public void setPoints( int points ) 71 { 72 mPoints = points; 73 } 74 75 public void addPoints(int points) 76 { 77 this.mPoints+=points; 78 } 79 80 public String getName() 81 { 82 return mName; 83 } 84 85 public void setName( String name ) 86 { 87 mName = name; 88 } 89 90 public String getFirstName() 91 { 92 return mFirstName; 93 } 94 95 public void setFirstName( String firstname ) 96 { 97 mFirstName = firstname; 98 } 99 100 public int getLicenseID() 101 { 102 return mLicenseID; 103 } 104 105 public void setLicenseID( int id ) 106 { 107 mLicenseID = id; 108 } 109 110 public String toString() 111 { 112 return mName+"/"+mPoints; 113 } 114 115 116 public long checkSum() { 117 return getPoints(); 118 } 119 } 120 | Popular Tags |