Skip to content

Instantly share code, notes, and snippets.

@sujaybhowmick
Last active December 31, 2015 12:19
Show Gist options
  • Save sujaybhowmick/7985365 to your computer and use it in GitHub Desktop.
Save sujaybhowmick/7985365 to your computer and use it in GitHub Desktop.
Java tutorials - Class/Object/Encapsulation
Identify the classes their properties and methods in the following problem description
I want to model a basic cellphone for an outgoing call. The phone should be able to dial a number,
initiate a call, ability to talk after successfulconnection to the dialed cell phone and then
disconnect. The cellphone should be enough battery to initiate a call and if the battery is dead
it should end the call gracefully. The phone should have ability to be switched on switched off.
For obvious reasons the user of the phone can make a call only if the phone is switched on. Also
For simplicity assume on 1 call is allowed at any given time (no hold and conference capabilities
are required).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment