Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
9.4 An On Line Store Using a Shopping Cart and Session Tracking
223
Listing 9.7 Item.java (continued)
  public Item(String itemID, String shortDescription,
              String longDescription, double cost) {
    setItemID(itemID);
    setShortDescription(shortDescription);
    setLongDescription(longDescription);
    setCost(cost);
  }
    
  public String getItemID() {
    return(itemID);
  }
  protected void setItemID(String itemID) {
    this.itemID = itemID;
  }
  public String getShortDescription() {
    return(shortDescription);
  }
  protected void setShortDescription(String shortDescription) {
    this.shortDescription = shortDescription;
  }
  public String getLongDescription() {
    return(longDescription);
  }
  protected void setLongDescription(String longDescription) {
    this.longDescription = longDescription;
  }
  public double getCost() {
    return(cost);
  }
  protected void setCost(double cost) {
    this.cost = cost;
  }
}
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




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

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