Java Reference
In-Depth Information
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the city
*/
public String getCity() {
return city;
}
/**
* @param city the city to set
*/
public void setCity(String city) {
this.city = city;
}
public String getFullName(){
return this.name + " - " + this.city;
}
}
Now that the Team class has been defined, a builder needs to be created. The pur-
pose of the builder object is to allow for a step-by-step creation of a team object. To ab-
stract the details of building an object, a builder class interface should be created. The
Search WWH ::




Custom Search