Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
368
Chapter 15 Integrating Servlets and JSP
Listing 15.5 TravelCustomer.java (continued)
public void setCreditCardNumber(String creditCardNumber) {
this.creditCardNumber = creditCardNumber;
}
public String getCreditCard() {
String cardName = getCreditCardName();
String cardNum = getCreditCardNumber();
cardNum = cardNum.substring(cardNum.length() 4);
return(cardName + " (XXXX XXXX XXXX " + cardNum + ")");
}
public String getPhoneNumber() {
return(phoneNumber);
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getHomeAddress() {
return(homeAddress);
}
public void setHomeAddress(String homeAddress) {
this.homeAddress = homeAddress;
}
public String getStartDate() {
return(startDate);
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return(endDate);
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getOrigin() {
return(origin);
}
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved