Create two java classes phonejava and phoneguijava


Create two Java classes: Phone.java and PhoneGUI.java. Phone.java will be the model of your cell phone. PhoneGUI will create a Phone object and call its methods when appropriate buttons on the screen are pressed.

1. Create a Phone.java to model a cell phone. Include methods and fields to implement the following functionality:

a. Accept characters (0 through 9, *, #) that will be appended to a String to build a phone number.

b. Send the current phone number putting the phone into "in a call" state.

c. End the current phone call putting the phone into "not in a call" state.

d. Erase the last character entered.

e. Clear the entire phone number string.

f. Recall the last phone number called.

2. Create the PhoneGUI.java class to implement the following functionality by calling methods in the Phone object.

a. Clicking a numbered button on the GUI will enter that number into the display. The new digit will append to what is displayed currently.

b. A clear function is required to erase the display screen.

c. A function to delete the last digit displayed is required.

d. A send function is required. Simulate this by displaying a message (ex: Calling 999999999)

e. An end function is required. Simulate this by displaying Call Ended.

f. A last number recall function is required. This will erase what ever is on the phone display screen and display the last number called instead.

g. Handle the little details such as what functionality is available or not available while in a call or when the call is ended.

h. No crashes please! Be sure to handle or avoid exceptions.

Deliverables:

1. Submit your result as a zip containing your project's .java files, other support files such as graphics, sound, etc. Also include an annotated document that demonstrates your fully functioning program with screen captures along with a description of what is happening at each stage of your demonstration. I should be able to follow your screen captures and duplicate the resulting output by running your program on my machine.

2. Be sure that your program runs on a standard machine using only the standard Java JDK 1.7x. That means no extra libraries UNLESS you can package it all into an executable that I can run without adding or installing and additional software on my machine. If you don't know what that means then stick to the basics for now.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create two java classes phonejava and phoneguijava
Reference No:- TGS01289963

Now Priced at $60 (50% Discount)

Recommended (91%)

Rated (4.3/5)