Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Наследяване и абстракция
- Интерфейси – дефинират съвкупност от свойства и методи, които се имплементират от самия клас, който наследява съответния интерфейс
- Наследяване – позволява на child класовете да наследяват характеристиките на класът-родител
- Child класовете могат да разширяват функционалността на наследения клас. Могат да променят и съществуващи методи от наследения клас чрез override-ване.
- Inheritance benefits:
- - Extensibility
- - Code reuse
- - Provides abstraction
- Структурите не могат да се наследяват
- Abstraction – means ignoring irrelevant features, properties or functions and emphasizing the ones that are relevant to the project we develop
- Abstraction gives us the ability to define abstract actions
- Abstraction is something we do every day
- - Looking at an object, we see the things that have meaning to us and ignoring the others
Advertisement
Add Comment
Please, Sign In to add comment