|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCellPhone
public class CellPhone
A Cell Phone object capable of adding minutes, making a call or a text.
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 |
---|
public CellPhone()
Method Detail |
---|
public void addMinutes(int minutesToAdd)
minutesToAdd
- to your plan.public int getCallCount()
public int getMinutes()
public int getTextCount()
public void makeCall(int duration)
duration
- of callpublic void sendText()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |