Question: can you answer this with explaination for every answerr please? StudenL 7) Consider the following UML diagram and codes. > > Carnivore Indigenous + getIndigenousName()

 can you answer this with explaination for every answerr please? StudenL

7) Consider the following UML diagram and codes. > > Carnivore Indigenous

can you answer this with explaination for every answerr please?

StudenL 7) Consider the following UML diagram and codes. > > Carnivore Indigenous + getIndigenousName() : String + getDietList() : String[] + getlndigenousRegion() : String Cat SilverFern Kiwi public class SilverFern implements Indigenous { public String getIndigenousName () return "Ponga"; public String getIndigenousRegion () return "New Zealand"; } public class Kiwi implements Indigenous, Carnivore{ public String getIndigenousName () return "Kiwi"; public String getIndigenousRegion () { return "New Zealand"; public String [] getDietList () "Sand Mites"}; return new String [] { "Worms", "Huhu Grubs", "Ants", } public class Cat implements Carnivore{ public String[] getDietList () return new String []{"Birds", "Lizards", "Mice"}; For each of the following assignment statements, state whether it is valid (with a tick) or invalid (with a cross) and if valid give the values of implemented methods. If the methods are not implemented put cross. Object Instantiation isvalid getindigenousName() getlndigenousRegion() getDietList() Indigenous animal = new Kiwi (); Indigenous plant SilverFern (); = new Kiwi animal new Kiwi (); Cat animal = new Kiwi (); Carnivore carnivore = new Kiwi ()

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!