Well, it's my turn to ask for help with this exercise:).
So, for today we're written the printAdRevenue() and printCookUtilization() methods (both void) in the ManagerTablet class, and the corresponding getters for them in the StatisticsManager class (I wasn't creative and called mine Map<Date, Double> getAdRevenue() and TreeMultimap<Date, String> getCookUtilization()). I also had to write the List<EventDataRow> getEventDataRows(EventType eventType) method---a getter in the StatisticsStorage class, nested inside the StatisticsManager one, because I'd been instructed so (it didn't save me a lot of energy, but Ok, why not).
I actually like the code I've come up with:)), but the validator doesn't seem to share my admiration:). The output's Ok, though.
As usual, I'm wondering what I'm still doing wrong.
package com.codegym.task.task27.task2712;
import com.codegym.task.task27.task2712.kitchen.Cook;
import com.codegym.task.task27.task2712.kitchen.Order;
import com.codegym.task.task27.task2712.kitchen.Waiter;
import java.io.IOException;
public class Restaurant {
public static void main(String[] args) throws IOException {
Tablet tablet = new Tablet(4); // observable
Cook cook = new Cook("Jamie Oliver"); // observer for the tablet & observable for the waiter
Waiter waiter = new Waiter(); // observer
tablet.addObserver(cook); // tablet is observed by cook
cook.addObserver(waiter); // cook is observed by waiter
tablet.createOrder();
tablet.createOrder();
tablet.createOrder();
tablet.createOrder();
ManagerTablet managerTablet = new ManagerTablet();
managerTablet.printAdRevenue();
managerTablet.printCookUtilization();
managerTablet.printActiveVideoSet();
managerTablet.printArchivedVideoSet();
}
}