Question
Capgemini
US
Last activity: 23 Nov 2017 10:53 EST
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***
Hello Suresh,
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.
Regards
Mahesh