Difference between revisions of "Teams Winter 2011/team1/BlackBerry/Implement Edit Option"

From CDOT Wiki
Jump to: navigation, search
(Created page with '=== 8. Implement Edit Student Option === 8.1. In the <pre> </pre>')
 
(8. Implement Edit Student Option)
Line 1: Line 1:
 
=== 8. Implement Edit Student Option ===
 
=== 8. Implement Edit Student Option ===
8.1. In the
+
8.1. In order to Implement the Edit Student menu option, firs we have to make sure that our Student class has all setters and getters we need, so we have to add the following methods to the <code>Student.Java<code/>:
 +
 
 
  <pre>
 
  <pre>
 +
 +
    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>
 
  </pre>

Revision as of 10:13, 22 March 2011

8. Implement Edit Student Option

8.1. In order to Implement the Edit Student menu option, firs we have to make sure that our Student class has all setters and getters we need, so we have to add the following methods to the Student.Java<code/>:


    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;
    }