Must dependent properties in abstract class be redefined in every concrete subclass?
Show older comments
I have an abstract superclass that defines some dependent properties, which an object of any concrete subclass should be able to return. Each subclass will have a unique method for deriving the value of each of these properties from its stored data, as implemented by a get.property method.
To do this it appears that I have to replicate the block of dependent properties from the superclass in every subclass. Is this correct? It seems redundant, since the properties are already defined in the superclass.
2 Comments
Matt J
on 6 Mar 2023
No, you don't have to do that. Why do you think so?
Bruce Elliott
on 7 Mar 2023
Edited: Bruce Elliott
on 7 Mar 2023
Accepted Answer
More Answers (0)
Categories
Find more on Schedule Model Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!