package dev.service;

import dev.dao.MenuItemDao;
import dev.model.MenuItem;

import java.util.List;

public class MenuService {

    private MenuItemDao menuItemDao = new MenuItemDao();

    public void showMenu() {

        List<MenuItem> allfood = menuItemDao.findAll();

        for(int i = 0 ; i < allfood.size() ; i++){
            MenuItem food = allfood.get(i);
            System.out.printf("%-5d | %-20s | %-15s | %-10.2f | %s%n",
                    food.getId(),
                    food.getName(),
                    food.getCategory(),
                    food.getPrice(),
                    food.getDescription());
        }


    }

}