Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

Why We Form Relationships Managing Relationship Dynamics?

Answered: 1 week ago