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|
-
What is the shape of the chi-square distribution?
-
To decide whether two variables of a population are associated, we usually need to resort to inferential methods such as the chi-square independence test. Why?
-
In which cycle does a company ship goods to customers? a. production cycle b. financing cycle c. revenue cycle d. expenditure cycle
-
In connection with her audit of the financial statements of Flowmeter, Inc., for the year ended December 31, 20X3, Joan Hirsch, CPA, is aware that certain events and transactions that have taken...
-
On January 1, 2024 Alsakan Company issued $550,000 of 11%, five-year bonds payable at 105. Peterson Company has extra cash and wishes to retire the bonds payable on January 1, 2025, immediately after...
-
From the following account balances, prepare in proper form for June (a) An income statement, (b) A statement of owner?s equity, (c) A balance sheet for Freeman Realty. Cash $5,200 S. Freeman,...
-
A hole is made in a convex lens, then (a) A hole appears in the image (c) Image intensity decreases (b) Image size decreases (d) No change
-
Edward and Brenda are married and file a joint return. They have two children, ages 8 and 10, who lived with them for all of 2023. In 2023, Edwards income from his job was $33,000. Brenda was a...
-
How do modern operating systems leverage techniques such as copy-on-write and transparent page sharing to optimize memory utilization and minimize overhead in virtualized environments ?
-
For this assessment, you will be required to research the following questions to provide sufficient evidence of your knowledge for this unit. There are word limits to guide your responses, however,...
-
Moon Manufacturing budgeted fixed overhead costs of $2.50 per unit at an anticipated production level of 1,450 units. In July the company incurred actual fixed overhead costs of $5,000 and actually...
-
Using practical example, discuss what SQL is and the distinction between DDL and DML as well as how SQL functions fits in both of them
-
FITTskills - International Market Entry Strategies Project Requirements International Trade Training Forum The Project To assess your understanding of the knowledge and skills presented in the...
-
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.
-
Unlike a perfectly competitive firm in long-run equilibrium, a monopolistically competitive firm will produce with _________ capacity. The firm could lower average costs by increasing output, but...
-
Because it faces competition, a monopolistically competitive firm has a(n) _________-sloping demand curve that tends to be more _________ than the demand curve for a monopolist.
-
Although average costs and prices are higher under monopolistic competition than they are under perfect competition, society gets a benefit from monopolistic competition in the form of _________...
Study smarter with the SolutionInn App