Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert the UML class diagram i. ii. 111. into a java code with the following conditions Define all classes and specify inheritance if any

Convert the UML class diagram i. ii. 111. into a java code with the following conditions Define all classes Cat numberOfTeeth: int lengthofTail: int name: String ownerName: String + Pet (name: String, ownerName:

Convert the UML class diagram i. ii. 111. into a java code with the following conditions Define all classes and specify inheritance if any in the diagram. [9 marks] Create a class called test. The main() method in the test class should create three Cat objects and two Budgie objects. The main() method should also create indirectly an object of the Pet class. Demonstrate polymorphism in your test class. [8 marks] Cat numberOfTeeth: int lengthofTail: int name: String ownerName: String + Pet (name: String, ownerName: String) + getName(): String + getownerName (): String Pet Cat (name:String, ownerName: String, numberOfTeeth: int, lengthofTail:int) + getNumberOfTeeth (): int + getLengthofTail (): int Budgie colourofFeathers: String + Budgie (name:string, ownerName: String, colourOfFeathers:string) + getColourOfFeathers(): string Convert the UML class diagram i. ii. 111. into a java code with the following conditions Define all classes and specify inheritance if any in the diagram. [9 marks] Create a class called test. The main() method in the test class should create three Cat objects and two Budgie objects. The main() method should also create indirectly an object of the Pet class. Demonstrate polymorphism in your test class. [8 marks] Cat numberOfTeeth: int lengthofTail: int name: String ownerName: String + Pet (name: String, ownerName: String) + getName(): String + getownerName (): String Pet Cat (name:String, ownerName: String, numberOfTeeth: int, lengthofTail:int) + getNumberOfTeeth (): int + getLengthofTail (): int Budgie colourofFeathers: String + Budgie (name:string, ownerName: String, colourOfFeathers:string) + getColourOfFeathers(): string

Step by Step Solution

3.48 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

Problem with the editor The code below terminates with two closing brackets Every time I review the question to submit I find those last two brackets have been omitted I edit the answer and put them b... 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

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students also viewed these Programming questions

Question

Solve for x. -4+log3(x+1)=-3

Answered: 1 week ago