Class CellPhone

java.lang.Object
  extended by CellPhone

public class CellPhone
extends Object

A Cell Phone object capable of adding minutes, making a call or a text.

Version:
February 23, 2008
Author:
William Lindner

Constructor Summary
CellPhone()
          Cell Phone constructor.
 
Method Summary
 void addMinutes(int minutesToAdd)
          Add minutes to your plan.
 int getCallCount()
          Get the number of calls you have sent.
 int getMinutes()
          Get the number of minutes you have left.
 int getTextCount()
          Get the number of texts you have made.
 void makeCall(int duration)
          Make a phone call and subtract the duration of the call from your minutes.
 void sendText()
          Send a text message which is equivalent to one minute of call time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellPhone

public CellPhone()
Cell Phone constructor.

Method Detail

addMinutes

public void addMinutes(int minutesToAdd)
Add minutes to your plan.

Parameters:
minutesToAdd - to your plan.

getCallCount

public int getCallCount()
Get the number of calls you have sent.

Returns:
calls you have made.

getMinutes

public int getMinutes()
Get the number of minutes you have left.

Returns:
minutes you have left.

getTextCount

public int getTextCount()
Get the number of texts you have made.

Returns:
texts you have sent.

makeCall

public void makeCall(int duration)
Make a phone call and subtract the duration of the call from your minutes.

Parameters:
duration - of call

sendText

public void sendText()
Send a text message which is equivalent to one minute of call time.