package storage;

import java.util.ArrayList;

public class OrderHistory {
    public ArrayList<Order> orders = new ArrayList<Order>();

    public OrderHistory(){}

    public void clearOrders(){
        if(orders != null) orders.clear();
    }

    public void addOrder(Order order){
        orders.add(order);
    }

    public Order getLastOrder(){
        if(orders.size() > 0){
            return orders.get(orders.size()-1);
        }else{
            return null;
        }
    }
}
