Question
INHERITANCE QUESTION: Using the work on the previous assignment, ask the user for a name, phone number, and email. Display the required information. given: -Phone.java-------------------
INHERITANCE QUESTION: Using the work on the previous assignment, ask the user for a name, phone number, and email. Display the required information. given: -Phone.java------------------- public class Phone { protected String name; protected long number; public Phone() { this("None", -1); } public Phone(String name) { this(name, -1); } public Phone(String name, long number) { this.name = name; this.number = number; } }
REQUIRED OUTPUT New number creation tool Enter name BobENTER Enter phone number 5552124567ENTER Enter email test@example.comENTER Name: Bob Phone: 5552124567 Email: test@example.com Telephone neighbor: (555) 212-4568 New number creation tool Enter name BillENTER Enter phone number 5552124569ENTER Enter email goodbye@example.comENTER Name: Bill Phone: 5552124569 Email: goodbye@example.com Telephone neighbor: (555) 212-4570
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started