Scenario with multiple classes - Can we create property in 1 class and use pattern inheritance for the rest?
I have three classes like 1.A-B-C-work-app-value 2.A-B-C-Work-app- 3. A-B-C-Work- Now the doubt is in which class I have to create a property and that can be available for all the above classes. As of my knowledge we Have to create the property in "1" class so that it can be available for all the classes by using pattern inheritance Please correct me if any wrong. TIA.
***Updated by moderator: Lochan to add Categories; edit title***
I think you got confused, if you create the property in 3rd class then it will be inherited to 1st and 2nd classes as 3rd class is the parent class for the 2nd class and 2nd class is the parent for the 1st class in your example with pattern inheritance.
So you need to create your property in A-B-C-Work class so that it will be inherited to other 2 classes. Hope it is clear to you.
Thank you for information.
How can we restrict the property for specific classes in the above scenario I need to restrict the property to 1st class and the property is available for only 2 and 3 classes only.
If your requirement is to restrict the property which is created in 1st class to be available for only 2nd & 3rd classes, then i don't think it is possible as per the Pattern inheritance the properties which are available in the parent class will be inherited to all its child classes and you can't make the property to be available for only specific child classes which is similar to Java inheritance concept.