Package Orders
Class Order
java.lang.Object
Orders.Order
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 Summary
ConstructorsConstructorDescriptionOrder
(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. -
Method Summary
Modifier and TypeMethodDescriptiongets the customer namethis is a getter for the delivery addressgets the delivery notesThis builds a list of the ordered item and returns that list as a stringthis gets the order-typegetPhone()
gets the customer phone numberint
gets the table number
-
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 nameorderItems
- contains the order's itemsorderType
- indicates whether the order is to be served in-housetableNum
- takes the table number, if applicabledeliveryAddress
- takes the delivery address if applicabledeliveryPhone
- takes the delivery phone number if applicabledeliveryNotes
- takes any miscellaneous notes any notes for the delivery (e.g. gate code, special instructions)
-
-
Method Details
-
getDeliveryAddress
this is a getter for the delivery address- Returns:
- it returns the delivery address
-
getPhone
gets the customer phone number- Returns:
- returns the customer phone number
-
getDeliveryNotes
gets the delivery notes- Returns:
- returns the delivery notes
-
getTableNum
public int getTableNum()gets the table number- Returns:
- returns the table number
-
getCustName
gets the customer name- Returns:
- returns the customer name
-
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
this gets the order-type- Returns:
- returns the order-type
-