Closed HCY123902 closed 3 years ago
If you don't, like in this question
A class like Moo which does not include an implemented method for interface Goo would either be abstract or unable to compile.
On the other hand, if Moo did not specify process()
, then yes it would inherit the method from its super class Bar. (unless it is inheriting DIRECTLY from an abstract class like Foo, in which case it would have to either instantiate process()
or simply be declared abstract itself).
Hello, can I ask a question regarding inheritance? Given that a class inherits the attribute of another class, will it be necessary to include the inherited attribute in the class diagram?
Should not include inherited members unless overridden by that class.
@damithc is it considered as strictly incorrect if its put in the subclass when the method is not overriden? (If lets we are asked to choose which options is incorrect)
@damithc is it considered as strictly incorrect if its put in the subclass when the method is not overriden? (If lets we are asked to choose which options is incorrect)
Yes, that would be misleading.
Thank you
Hello, can I ask a question regarding inheritance? Given that a class inherits the attribute of another class, will it be necessary to include the inherited attribute in the class diagram?