#!binbash
#!binbash
/bin/bash
# Load configuration
source ./canteen_config.sh
item="${MENU_ITEMS[choice - 1]}"
price="${MENU_PRICES[choice - 1]}"
total=$((quantity * price))
echo "Ordered: $quantity x $item - Total: $total"
echo "$quantity x $item - $total" >> "$ORDERS_FILE"
}
# Main script
while true; do
display_menu
echo "Enter your choice:"
read option
case $option in
1) display_menu_items ;;
2) place_order ;;
3) view_orders ;;
4) echo "Exiting..."; break ;;
*) echo "Invalid choice. Please try again." ;;
esac
echo "Press Enter to continue..."
read
done