Fix grammatical errors (#28934)

This commit is contained in:
Shashank Goyal
2019-04-03 09:54:36 +01:00
committed by The Coding Aviator
parent 96a136f24b
commit 19862aa591

View File

@ -23,7 +23,7 @@ In procedural programming, we simply create variables and change them when requi
Another extremely useful concept is that of inheritance. The idea is that a class can inherit attributes and behaviour from a base class. For example, while creating a game, we have a player and enemy. We can create a base class called person, and give it attributes like name, age, gender, etc. Person's behaviour can be walk and jump. A player and enemy can then inherit these "qualities" from person, and can have added qualities like kill, score, eat, etc.
This helps in reusing code and making your code structure much more clean. Data hiding is another cool feature. In OO, we have the notion of private and public attributes. Private attributes can be accessed and modified only by methods of that particular class, while public data can be modified from anywhere in the program (within scope obviously).
This helps in reusing code and making your code structure much cleaner. Data hiding is another cool feature. In OO, we have the notion of private and public attributes. Private attributes can be accessed and modified only by methods of that particular class, while public data can be modified from anywhere in the program (within scope obviously).
OO programming represents problem as a real-life statement and thus helps us solve those problems in an effective way. An object in OO programming represents a real-life entity. A class represents a blueprint of a number of objects. An object can be considered as an instance of a class.