Question: Ask the user for a name, phone number, and email. Display the information shown in the test cases. Be sure to use your work from

Ask the user for a name, phone number, and email. Display the information shown in the test cases. Be sure to use your work from the previous questions.Upload SmartPhone.java and a new file, MyDemo.java, which will contain main. After you upload both files, be sure to make a selection in the File to run column (select MyDemo.java)
Test Case 1
New number creation tool
Enter name
Alan Turingenter
Enter phone number
5551945123enter
Enter email
alan.turing@computation.orgenter
Name: Alan Turing
Number: 5551945123
Area code: 555
Prefix: 194
Line number: 5123
Email: alan.turing@computation.org
Telephone neighbor: (555)194-5124
Test Case 2
New number creation tool
Enter name
Ada Lovelaceenter
Enter phone number
2125551832enter
Enter email
ada.lovelace@analyticalengine.netenter
Name: Ada Lovelace
Number: 2125551832
Area code: 212
Prefix: 555
Line number: 1832
Email: ada.lovelace@analyticalengine.net
Telephone neighbor: (212)555-1833
Test Case 3
New number creation tool
Enter name
Grace Hopperenter
Enter phone number
4085551906enter
Enter email
grace.hopper@navy.milenter
Name: Grace Hopper
Number: 4085551906
Area code: 408
Prefix: 555
Line number: 1906
Email: grace.hopper@navy.mil
Telephone neighbor: (408)555-1907
Test Case 4
New number creation tool
Enter name
Donald Knuthenter
Enter phone number
6465551938enter
Enter email
donald.knuth@artofprogramming.comenter
Name: Donald Knuth
Number: 6465551938
Area code: 646 Prefix: 555
Line number: 1938
Email: donald.knuth@artofprogramming.com
Telephone neighbor: (646)555-1939
Test Case 5
New number creation tool
Enter name
Linus Torvaldsenter
Enter phone number
3105551991enter
Enter email
linus.torvalds@kernel.orgenter
Name: Linus Torvalds
Number: 3105551991
Area code: 310
Prefix: 555
Line number: 1991
Email: linus.torvalds@kernel.org
Telephone neighbor: (310)555-1992
Test Case 6
New number creation tool
Enter name
Tim Berners-Leeenter
Enter phone number
7185551989enter
Enter email
tim.bernerslee@worldwideweb.netenter
Name: Tim Berners-Lee
Number: 7185551989
Area code: 718
Prefix: 555
Line number: 1989
Email: tim.bernerslee@worldwideweb.net
Telephone neighbor: (718)555-1990 public class Phone
{
protected String name;
protected long number;
public Phone(String name, long number){
this.name = name;
this.number = number;
}
public String toString(){
return "I am a phone!";
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!