Question: I need help on this particular problem. This is in relevance to Chapter.11: Advance Inheritance Concepts in the book Java Programming 8th Edition by Joyce

I need help on this particular problem. This is in relevance to Chapter.11: Advance Inheritance Concepts in the book Java Programming 8th Edition by Joyce Farrell. I'm not too sure how to begin since I am fairly new into programming. I have to submit this work within 24 hours.

1.Create an Interface named Phone. The Phone interface will have the following methods: call, end, and text. Next create the following classes: iPhone and Samsung. The iPhone class will implement the Phone Interface call method will print out "Call iPhone," and the end method will print out "End iPhone." The Samsung call method will print "Call Samsung," and the end method will print "End Samsung." Save the files as Phone.java, iPhone.java, and Samsung.java.

2.Create a class Person.java. The class will have the fields, name and phone number, that will be set through the constructor. The Person class will have the methods getName and getNumber. In addition, override the toString method to return the name and number. Create test class TestPerson that will create an array of Person and iterate through them calling their toString() method. Save the files as Person.java and TestPerson.java.

3.Create an application Call.java. The Call class will have an array of Phones (Samsung and iPhone). In addition, the application will populate an array of Person from above with the following information:

"Joe", "555-1234", "Bob", "555-4444", "Alice", "555-6565", "Sally","555-1111"

4.Modify the Phone Interface call method from above to accept a Person object. The implementation will output and append the Person number to the end. The Call class will prompt the user to make a call by allowing the user to select phone and person.

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 Databases Questions!