I came across the following description of IsRoot
, IsAbstract
& IsLeaf
however do not understand when you would used them.
Excerpt from http://www2.sys-con.com/itsg/virtualcd/dotnet/archives/0108/clark/index.htm:
By checking the IsRoot check box, you are restricting the class from inheriting from other classes. Checking IsAbstract restricts the class from being instantiated, and forces clients to instantiate a derived class to access the functionality of the class. Checking IsLeaf indicates that the class is sealed. Sealed classes are noninheritable and help to limit the depth of an inheritance chain.
My understanding
- IsRoot seems to suggest that it is a superclass
- IsAbstract seems to suggest it is an abstract class
- IsLeaf is a class that cannot be inherited but can be instantiated.
Can someone give me a real-world example of a model that uses these? For example I can imagine class such as 'car' that is a superclass and is abstract and beneath it you would have classes such as 'Volvo', 'Chevrolet', etc.