Package Orders

Class Order

java.lang.Object
Orders.Order

public class Order extends Object
The Order class creates an object that represents a food order with parameters for information about the customer, the order itself, and the delivery details.
  • Constructor Details

    • Order

      public Order(String custName, ArrayList<Integer> orderItems, String orderType, int tableNum, String deliveryAddress, String deliveryPhone, String deliveryNotes)
      creates an order object with parameters for the order number, customer name, items in the order the type of order, the table number - if dining in - , the delivery address and phone # - if for delivery, and any notes.
      Parameters:
      custName - contains the customer name
      orderItems - contains the order's items
      orderType - indicates whether the order is to be served in-house
      tableNum - takes the table number, if applicable
      deliveryAddress - takes the delivery address if applicable
      deliveryPhone - takes the delivery phone number if applicable
      deliveryNotes - takes any miscellaneous notes any notes for the delivery (e.g. gate code, special instructions)
  • Method Details

    • getDeliveryAddress

      public String getDeliveryAddress()
      this is a getter for the delivery address
      Returns:
      it returns the delivery address
    • getPhone

      public String getPhone()
      gets the customer phone number
      Returns:
      returns the customer phone number
    • getDeliveryNotes

      public String getDeliveryNotes()
      gets the delivery notes
      Returns:
      returns the delivery notes
    • getTableNum

      public int getTableNum()
      gets the table number
      Returns:
      returns the table number
    • getCustName

      public String getCustName()
      gets the customer name
      Returns:
      returns the customer name
    • getOrderItems

      public String getOrderItems()
      This builds a list of the ordered item and returns that list as a string
      Returns:
      returns the build string of ordered items from the menu item hashmap of existing menu items
    • getOrderType

      public String getOrderType()
      this gets the order-type
      Returns:
      returns the order-type