Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose that the following classes have already been coded so you DONT need to write them: The Plant class has one instance variable called (English)

Suppose that the following classes have already been coded so you DONT need to write them: The Plant class has one instance variable called (English) name. Tree inherits from Plant and adds a height instance variable.

a) Write the code for a PlantFacts interface containing the following methods:

a method to return the botanical (Latin) name of the plant

a method that describes how the plant is used by humans (eg, as food, to build houses, etc)

b) Dont write any code just answer these questions:

i. what changes would you have to make to the Plant class so that it can use the PlantFacts interface?

ii. if the Plant class has been changed so that it can use the PlantFacts interface (as described above), what changes would you need to make to the Tree class?

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_2

Step: 3

blur-text-image_3

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

What are the classifications of Bank?

Answered: 1 week ago

Question

3. Describe the strategic training and development process.

Answered: 1 week ago

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago