Design and implement a console-based restaurant menu management program. Requirements:
(
-
There are exactly three fixed item categories represented by an enum (e.g., APPETIZER, MAIN, DESSERT).
(
-
Support addItem(name, price, category), updatePrice(name, newPrice), removeItem(name), listAll(), and listByCategory(category).
(
-
Print items using each object's toString() rather than accessing fields via getters; list output grouped by category and sorted alphabetically within each category.
(
-
Choose data structures to achieve O(
-
add/update/remove by name and O(k log k) listing within a category (k = number of items in that category).
(
-
Provide a simple CLI that reads commands from stdin and executes them, plus basic unit tests.