Lab 2: the MobilePhone class
Create a MobilePhone class that stores load left (as a double) in pesos,
total minutes called (as an int),
and rate (as a double) in pesos per minute.
Load and minutes consumed start at 0,
rate starts at 6.50 pesos/minute.
Support the following methods:
- void load( double pesos )
- void call( int minutes )
- double getLoadLeft()
- int getTotalMinutesCalled()
optional:
- void changeRate( double newCallRate )
- void sendTextMessage(): subtract 1 peso from load
- int getNumTextMessages(): you will need an extra field to support this
Write this program in BlueJ and test
the class by creating objects and running methods
on that object.
Zip your BlueJ project and submit through
moodle .