1 package edu.berkeley.fleet;
6 public class LessThanZeroShip extends Ship {
8 Inbox in = new Inbox("in");
9 Outbox true_ = new Outbox("true");
10 Outbox false_ = new Outbox("false");
12 public LessThanZeroShip(Fleet fleet, String name) {
16 public void service() {
17 if (in.empty()) return;
18 int val = in.remove();
19 (val<0 ? true_ : false_).add(0);