Пример #1
0
 @Override
 public void update(Observable o, Object arg) {
   ConsoleHelper.writeMessage(
       String.format(
           "Start cooking - %s, cooking time %dmin",
           arg.toString(), ((Order) arg).getTotalCookingTime()));
   setChanged();
   notifyObservers(arg);
 }
Пример #2
0
 @Override
 public void update(Observable o, Object arg) {
   ConsoleHelper.writeMessage(String.format("%s was cooked by %s", arg, o));
 }