/**
 * class Package
 * Represents a holiday package
 * 
 * @author Jim
 * @version 1.0
 */

public class Package{

    private int packageID;
    private String location;
    private String name;
    private String description;
    private double adultPrice;
    private double childPrice;
    private String departure;
    private int sales;

    /**
     * Default Constructor for Package
     */
    public Package() 
    {
        this.packageID=0;
    }
    
    /**
     * Constructor for new objects of class Package
     * 
     * @param location the location
     * @param name the package name
     * @param description the package description
     * @param adultPrice the adult price
     * @param childPrice the child price
     * @param departure the departure airport
     */
    public Package(String location, String name, String description, 
                double adultPrice, double childPrice, String departure)
    {   
        this.packageID = 0;     // value will be set by database when package is stored, don't set here
        this.location = location;
        this.name = name;
        this.description = description;
        this.adultPrice = adultPrice;
        this.childPrice = childPrice;
        this.departure = departure;
        this.sales = 0;     // new package will have no sales initially
    }
    
    /**
     * Constructor to instantiate objects of class Package
     * Sets value of ID field - intended for use when instantiating object
     * from database
     * 
     * @param packageID the package ID
     * @param location the location
     * @param name the package name
     * @param description the package description
     * @param adultPrice the adult price
     * @param childPrice the child price
     * @param departure the departure airport
     * @param sales the sales total
     */
    public Package(int packageID, String location, String name, String description, 
                double adultPrice, double childPrice, String departure, int sales)
    {   
        this.packageID = packageID;
        this.location = location;
        this.name = name;
        this.description = description;
        this.adultPrice = adultPrice;
        this.childPrice = childPrice;
        this.departure = departure;
        this.sales = sales;
    }
 
    /**
     * Getter for packageID
     *
     * @return value of packageID
     */
    public int getPackageID() {
        return packageID;
    }

  
     /**
     * Setter for packageID
     *
     * @param packageID new packageID value
     */
    public void setPackageID(int packageID) {
        this.packageID = packageID;
    }

  
    /**
     * Getter for location
     *
     * @return value of location
     */
    public String getLocation() {
        return location;
    }

  
     /**
     * Setter for location
     *
     * @param location new location value
     */
    public void setLocation(String location) {
        this.location = location;
    }

  
    /**
     * Getter for name
     *
     * @return value of name
     */
    public String getName() {
        return name;
    }

  
     /**
     * Setter for name
     *
     * @param name new name value
     */
    public void setName(String name) {
        this.name = name;
    }

  
    /**
     * Getter for description
     *
     * @return value of description
     */
    public String getDescription() {
        return description;
    }

  
     /**
     * Setter for description
     *
     * @param description new description value
     */
    public void setDescription(String description) {
        this.description = description;
    }

  
  
    /**
     * Getter for adultPrice
     *
     * @return value of adultPrice
     */
    public double getAdultPrice() {
        return adultPrice;
    }

  
      /**
     * Setter for adultPrice
     *
     * @param adultPrice new adultPrice value
     */
    public void setAdultPrice(double adultPrice) {
        this.adultPrice = adultPrice;
    }

  
   /**
     * Getter for childPrice
     *
     * @return value of childPrice
     */
    public double getChildPrice() {
        return childPrice;
    }

    /**
     * Setter for childPrice
     *
     * @param childPrice new childPrice value
     */
    public void setChildPrice(double childPrice) {
        this.childPrice = childPrice;
    }
    
    /**
     * Getter for departure
     *
     * @return value of departure
     */
    public String getDeparture() {
        return departure;
    }

  
      /**
     * Setter for departure
     *
     * @param departures new departure value
     */
    public void setDeparture(String departure) {
        this.departure = departure;
    }
    
    /**
     * Getter for sales
     *
     * @return value of sales
     */
    public int getSales() {
        return sales;
    }

  
    /**
     * Setter for departure
     *
     * @param departures new departure value
     */
    public void setSales(int sales) {
        this.sales = sales;
    }
}
