// rpf, 011301 for JUG group cell phone project // done on hearthside // javadoc added 020201 package jug; import java.io.*; import java.lang.String; /** * A simple cell phone that "sends" and "receives" a string message. */ public class CellPhone1 { public static void main (String[] args) { System.out.println("Operator?"); } Space1 space; CellPhone1(Space1 spaceArg) { space = spaceArg; } /** * The step method - at each step the phone deposits a message in "space". * The message goes to the base. * The phone prints what it receives "from space", from the base. */ public void step() { space.toBase = "I'm a phone"; System.out.println("Phone hears " + space.fromBase); } }