Changes

Jump to: navigation, search
no edit summary
3.1. Create class <code>Student</code>. It is holder for contacts:
<pre>
package cs.ecl.team1.android; public class Student { private String firstName; private String lastName; private String email; /** * Constructs a Student * @param firstName The student's first name * @param lastName The student's last name * @param email The student's email address */ public Student(String firstName, String lastName, String email) { this.firstName = firstName; this.lastName = lastName; this.email = email; }  public String getEmail() { return email; } public String getName() { return firstName + " " + lastName; } public String toString() { return firstName + " " + lastName; } // added so that student info can be edited public String getFirstname(){ return this.firstName; } public String getLastName(){ return this.lastName; } public void setEmail(String email){ this.email = email; } public void setFirstName( String firstName){ this.firstName=firstName; } public void setLastName(String lastName){ this.lastName = lastName; } } 
</pre>
3.2. Inside the <code>ContractList</code> class create a Vector of objects <code>Student</code>:
}
</pre>
3.5. run Run the application:<br/>
[[Image: A_main5.png | 450px]]<br/>
1
edit

Navigation menu