Source of Student.java


  1: package adapter;
  2: 
  3: public class Student implements Cloneable {
  4:   
  5:   public Student() {}
  6: 
  7:   public Student(String ID, 
  8:                  String firstName, 
  9:                  String lastName, 
 10:                  String streetAddress, 
 11:                  String state, 
 12:                  String city, 
 13:                  String country, 
 14:                  String postalCode, 
 15:                  String telephone, 
 16:                  float GPA, 
 17:                  int totalCredits) {
 18:     this.ID = ID;
 19:     this.firstName = firstName;
 20:     this.lastName = lastName;
 21:     this.streetAddress = streetAddress;
 22:     this.state = state;
 23:     this.city = city;
 24:     this.country = country;
 25:     this.postalCode = postalCode;
 26:     this.telephone = telephone;
 27:     this.GPA = GPA;
 28:     this.totalCredits = totalCredits;
 29:   }
 30:   
 31:   public Object clone()
 32:       throws CloneNotSupportedException {
 33:     return super.clone();
 34:   }
 35:   
 36:   public String getCity() {
 37:     return city;
 38:   }
 39:   
 40:   public String getCountry() {
 41:     return country;
 42:   }
 43:   
 44:   public String getFirstName() {
 45:     return firstName;
 46:   }
 47:   
 48:   public float getGPA() {
 49:     return GPA;
 50:   }
 51:   
 52:   public String getID() {
 53:     return ID;
 54:   }
 55:   
 56:   public String getLastName() {
 57:     return lastName;
 58:   }
 59:   
 60:   public String getPostalCode() {
 61:     return postalCode;
 62:   }
 63:   
 64:   public String getState() {
 65:     return state;
 66:   }
 67:   
 68:   public String getStreetAddress() {
 69:     return streetAddress;
 70:   }
 71:   
 72:   public String getTelephone() {
 73:     return telephone;
 74:   }
 75:   
 76:   public int getTotalCredits() {
 77:     return totalCredits;
 78:   }
 79:   
 80:   public void setCity(String city) {
 81:     this.city = city;
 82:   }
 83:   
 84:   public void setCountry(String country) {
 85:     this.country = country;
 86:   }
 87:   
 88:   public void setFirstName(String firstName) {
 89:     this.firstName = firstName;
 90:   }
 91:   
 92:   public void setGPA(float GPA) {
 93:     this.GPA = GPA;
 94:   }
 95:   
 96:   public void setID(String ID) {
 97:     this.ID = ID;
 98:   }
 99:   
100:   public void setLastName(String lastName) {
101:     this.lastName = lastName;
102:   }
103:   
104:   public void setPostalCode(String postalCode) {
105:     this.postalCode = postalCode;
106:   }
107:   
108:   public void setState(String state) {
109:     this.state = state;
110:   }
111:   
112:   public void setStreetAddress(String streetAddress) {
113:     this.streetAddress = streetAddress;
114:   }
115:   
116:   public void setTelephone(String telephone) {
117:     this.telephone = telephone;
118:   }
119:   
120:   public void setTotalCredits(int totalCredits) {
121:     this.totalCredits = totalCredits;
122:   }
123:   
124:   public String toString() {
125:     StringBuffer s = new StringBuffer();
126:     s.append("Student [");
127:     s.append("totalCredits=");
128:     s.append(totalCredits);
129:     s.append("; ");
130:     s.append("GPA=");
131:     s.append(GPA);
132:     s.append("; ");
133:     s.append("telephone=");
134:     s.append(telephone);
135:     s.append("; ");
136:     s.append("postalCode=");
137:     s.append(postalCode);
138:     s.append("; ");
139:     s.append("country=");
140:     s.append(country);
141:     s.append("; ");
142:     s.append("city=");
143:     s.append(city);
144:     s.append("; ");
145:     s.append("state=");
146:     s.append(state);
147:     s.append("; ");
148:     s.append("streetAddress=");
149:     s.append(streetAddress);
150:     s.append("; ");
151:     s.append("lastName=");
152:     s.append(lastName);
153:     s.append("; ");
154:     s.append("firstName=");
155:     s.append(firstName);
156:     s.append("; ");
157:     s.append("ID=");
158:     s.append(ID);
159:     s.append("]");
160:     return s.toString();
161:   }
162:   
163:   protected int totalCredits;
164:   
165:   protected float GPA;
166:   
167:   protected String telephone;
168:   
169:   protected String postalCode;
170:   
171:   protected String country;
172:   
173:   protected String city;
174:   
175:   protected String state;
176:   
177:   protected String streetAddress;
178:   
179:   /** The last name of the student */
180:   protected String lastName;
181:   
182:   /** The first name of the student */
183:   protected String firstName;
184:   
185:   /** The ID of the student */
186:   protected String ID;  
187:   
188: }