item.java

来自「Online flight booking」· Java 代码 · 共 84 行

JAVA
84
字号
package coreservlets;

/** Describes a catalog item for on-line store. The itemID
 *  uniquely identifies the item, the short description
 *  gives brief info like the book title and author,
 *  the long description describes the item in a couple
 *  of sentences, and the cost gives the current per-item price.
 *  Both the short and long descriptions can contain HTML
 *  markup.
 *  <P>
 *  Taken from Core Servlets and JavaServer Pages
 *  from Prentice Hall and Sun Microsystems Press,
 *  http://www.coreservlets.com/.
 *  &copy; 2000 Marty Hall; may be freely used or adapted.
 */
public class Item {

    private String itemID;
    private String AirlineName;
    private String date;
    private String Time;
    private String Location;
    private double cost;

    public Item(String itemID, String AirlineName,
            String date,String Time,String Location, double cost) {
        setItemID(itemID);
        setAirlineName(AirlineName);
        setDate(date);
        setTime(Time);
        setLocation(Location);
        setCost(cost);
    }

    public String getItemID() {
        return (itemID);
    }

    protected void setItemID(String itemID) {
        this.itemID = itemID;
    }

    public String getAirlineName() {
        return (AirlineName);
    }

    protected void setAirlineName(String AirlineName) {
        this.AirlineName = AirlineName;
    }

    public String getDate() {
        return (date);
    }

    protected void setDate(String date) {
        this.date = date;
    }

      public String getTime() {
        return (Time);
    }

    protected void setTime(String Time) {
        this.Time = Time;
    }

     public String getLocation() {
        return (Location);
    }

    protected void setLocation(String Location) {
        this.Location = Location;
    }
    
    public double getCost() {
        return (cost);
    }

    protected void setCost(double cost) {
        this.cost = cost;
    }
}
  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?