Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UML,java,inheritance,polymorphism, please explain in detail You are currently working on a content patch for World of Wolfcraft and you will be adding in two new

UML,java,inheritance,polymorphism, please explain in detail

image text in transcribed

image text in transcribed

image text in transcribed

You are currently working on a content patch for "World of Wolfcraft" and you will be adding in two new playable types. Werewolf and Vampire, the goal is to reuse the functionality already defined in the current game and not change too much. If a significant change is r necessary that you can rationalise why your solution would be better for maintenance. Animal - hp: int - maxHP: int -xy: int[] +move(xAxis:double, yAxis:double): void +attack(target: Animal): void +Levelup(): void +setHP (hp:int) : void +getHP(): int +set Coordinates (xy: int[]); void +getCoordinates(): int[] Human -armour: String -name: String +move(xAxis:double, yAxis:double): void +attack(target: Animal): void +levelup(): void +addArmour(armour:String): void +removeArmour(idx:int) : void +getArmour(): List +getName(): String Canine - furColour: String +move(xAxis: double, yAxis:double): void +attack(target: Animal): void +levelup(): void +howl(): void +setColour(colour:String): void +getColour(): String Bat - furColour: String +move(xAxis:double, yAxis:double): void +attack(target:Animal): void +levelup(): void +setColour(colour:String): void +getColour(): String +fly(): void Wolf Dog -name: String +move(xAxis: double, yAxis: double): void +attack(target: Animal): void +levelup(): void +howl(): void +getName(): String +setName (name: String): void +move (xAxis: double, yAxis:double): void +attack(target:Animal): void +levelup(): void +howl(): void +hunt(target : Animal): void Figure 3: World of Wolfcraft UML Diagram Discuss how inheritance have been used within the diagram with your peers, what methods and attributes are accessible by subclasses and potentially reused. Why would integrating the two new classes, Werewolf and Vampire be difficult with the cur- rent structure? Identify methods and attributes that belong to each type. Once you have found common meth- ods and attributes, with any methods, consider abstracting it with an interface, with any at- tributes, consider a separate class containing the attributes There are a couple more expansions planned for the game. The next one will involve a playable Cat class, is the new class diagram able to handle the additional class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago

Question

Conduct a needs assessment. page 269

Answered: 1 week ago