Muhammad R.

asked • 11/19/20

Write code using following class diagram. Is it possible to extract polymorphic behavior from the given class design?

Animal

+age: Int

+gender: String

+isMammal()

+talk()

Zoo

+name: String

+Address: String

+animals: Animals[]

+listAllAnimals()


Duck

+beakColor: String = “yellow”

+swim()

+quack()

+talk()

Fish

+sizeInFeet: Int

+canEat: boolean

-swim()

+quack()

+talk()



Patrick B.

source code uploaded to RESOURCES section under this link..
Report

11/19/20

1 Expert Answer

By:

Patrick B. answered • 11/19/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.