Question: System Analysis and Design Question Four 1.5 Marks Consider an abstract class Duck, representing all available ducks. Every duck can quack and walk, which are

System Analysis and Design

System Analysis and Design Question Four 1.5 Marks Consider an abstract class

Question Four 1.5 Marks Consider an abstract class Duck, representing all available ducks. Every duck can quack and walk, which are their publicly accessible functionalities. While every duck walks the same way, they quack differently which makes quacking an abstract feature of a duck. Every duck has a weight which determines their ability to float, which can be checked by everybody through canFloat method. The weight of a duck can be set through a method available only for all concrete duck implementations. A rubber duck, a kind of a duck, has all the features of a duck (yes, it quacks), but when asked to walk - it acts differently, because a rubber duck can't walk, so it overrides a duck walk feature and does nothing. Another example of a duck is a wild duck that apart of quacking and walking, can also fly. Draw a class diagram depicting classes, with names, attributes and methods along with proper relationship between classes. Skip constructors and destructors, but don't forget to annotate elements visibility using UML notation. For the actual attributes types or method signatures you can use Java notation, if you wish. Precede a name with a symbol to indicate slanted (italicized) text Answeri

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create a UML class diagram for the problem described identify the classes methods and relationshi... View full answer

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!