java.lang.Objectcz.muni.fi.pb162.task2.MobilePhone
public class MobilePhone
| Constructor Summary | |
|---|---|
MobilePhone()
Default contructor |
|
MobilePhone(int charge)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
connectedNumber()
Returns currently called number. |
void |
dial(java.lang.String number)
Dials the number, starts the call. |
int |
discharge()
Discharging step. |
int |
getBatteryState()
Returns current battery charge (state). |
void |
hangUp()
Hangs up the phone. |
int |
charge()
Charging step. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MobilePhone()
public MobilePhone(int charge)
charge - represent amount of charge which's in the device| Method Detail |
|---|
public java.lang.String connectedNumber()
connectedNumber in interface cz.muni.fi.pb162.task2.Phonepublic void dial(java.lang.String number)
dial in interface cz.muni.fi.pb162.task2.Phonenumber - called numberpublic int discharge()
discharge in interface cz.muni.fi.pb162.task2.Chargeablepublic int getBatteryState()
getBatteryState in interface cz.muni.fi.pb162.task2.Chargeablepublic void hangUp()
hangUp in interface cz.muni.fi.pb162.task2.Phonepublic int charge()
charge in interface cz.muni.fi.pb162.task2.Chargeable