Convert the UML class diagram i. ii. 111. into a java code with the following conditions...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
Woody earns an annual salary of $50,000. His company matches 50% of his 401(k) contributions up to 6% of his compensation (max 3% company contribution). Woody contributed $5,000 to the plan this year...
-
Solve for x. -4+log3(x+1)=-3
-
A semi-annual coupon bond with 10 years to maturity and 10% annual coupon rate. The annual market required interest rate is 8%. Assume the bond's face value is $1000. Based on semiannual compounding,...
-
Sketch the graph of the function and state its domain. f (x) = ln |x|
-
Explain how the value at risk (VaR) method can be used to determine whether a bank has adequate capital.
-
What is dn for each of the following complexes? Pd(PPh3)4
-
What is eco-efficiency? How is it measured? Why is it measured? Where is it reported?
-
Collins Corporation purchased office equipment at the beginning of 2009 and capitalized a cost of $2,000,000. This cost figure included the following expenditures: The company estimated an eight-year...
-
TGIS Inc. wants to have $700,000 set aside for a major expansion of the greenhouses in 4 years. How much would the need to set aside now if they can save $9,000 each month at a 8.25% return
-
Whispering issued an 9%, 10-year $1,800,000 bond to build a monorail mass transit system. The city received $1,587,988 cash from the bond issuance on January 1, 2025. The bond yield is 11%. Interest...
-
Write a memo about a recent workplace issue (if you are not presently employed, please use an issue from an organization to which you belong or make up a scenario). Describe the issue and provide a...
-
Fraser's taxable income is $53,540. According to the table below, the federal tax payable is: Taxable Income Federal Tax Rate $46,605 or less (Base Amount) 15% Between $46,605 and $93,208 15% on the...
-
Explain the role of an HR audit as it relates to strategy formation. Describe one benefit of an HR audit
-
Experts often _ _ _ _ _ _ _ _ . appear meek and unassuming on TV use language everyone easily understands have special knowledge in a narrow field know a little about a variety of topics
-
Write a 5 -8 paragraph essay in MLA styles about "Drones" with references. In order to generate MLA citations, use CCC library, Purdue Owl; citethisforme.com: this is a citation generator for MLA and...
-
Kristen the first child, took the path of four year college with a full-time job upon graduation and started saving immediately. She faithfully put $100 a week into an investment account for the next...
-
What is the maximum % discount that a man can offer on her MP so that he ends up selling at no profit or loss, if he had initially marked his goods up by 35% (approximately)?
-
9.Consider the reaction 3NO2(g)+H2O=2HNO3(aq)+NO(g) where Delta H=-137 kJ.How many kilojoules are released when 92.3g of NO2 reacts?
-
Ever since you walked through the door, your interviewee, Max Hugo, has been shuffling papers, looking at his watch, and drumming on his desk with his fingers. Based on what you know about...
-
Were a progressive company, always looking to be ahead of the power curve. Well give anything a whirl if itll put us ahead of the competition, and that includes every one of us, says I. B. Daring, an...
-
Use the principles of partitioning to determine which of the processes in Problem 18 should be included in separate programs.
-
A rotor which is balanced statically but not dynamically is supported on two bearings \(\mathrm{L}\) apart and at high speed of the rotor, reaction of the left bearing is \(R\). The right side of the...
-
If a number of forces act on a rigid body, each force may be replaced by an equal and parallel force acting through a fixed point, together with a couple. For the rigid body to be in equilibrium, (a)...
-
A machine of \(100 \mathrm{~kg}\) mass has a \(20 \mathrm{~kg}\) rotor with \(0.5 \mathrm{~mm}\) eccentricity. The mounting springs have stiffness \(85 \mathrm{kN} / \mathrm{m}\) and damping is...
Study smarter with the SolutionInn App