Class RungPerson

java.lang.Object
  |
  +--RungPerson

public class RungPerson
extends java.lang.Object

RungPerson is for testing with a "ring only" RingingPhone. In this way the two classes are isolated so that only the two need testing.
For 2 phone demo code for COM1204 OO Design Sp 2001

Version:
0.1, 4/28/2001
Author:
Bob Futrelle

Constructor Summary
RungPerson()
           
 
Method Summary
 void givePhone(RingingPhone phone)
           
static void main(java.lang.String[] args)
          This is a very simple test, since it only needs to create a RingingPhone and a RungPerson and step them both.
 void step()
          This listens for a ring, echoes what it hears and hangs up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RungPerson

public RungPerson()
Method Detail

main

public static void main(java.lang.String[] args)
This is a very simple test, since it only needs to create a RingingPhone and a RungPerson and step them both.

givePhone

public void givePhone(RingingPhone phone)

step

public void step()
This listens for a ring, echoes what it hears and hangs up. It interacts only with at RingingPhone, for testing purposes. The design was done by workikng out the operation of step() and then designing the methods it used.