From a7ad6dff118ccec62971f8b793c04da06517e366 Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Thu, 25 Oct 2018 12:38:31 +0700 Subject: [PATCH] Fix typo for Object Oriented Programming article (#19860) --- .../design-patterns/object-oriented-programming/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/english/design-patterns/object-oriented-programming/index.md b/guide/english/design-patterns/object-oriented-programming/index.md index 382bbf27c3..d903d1dace 100644 --- a/guide/english/design-patterns/object-oriented-programming/index.md +++ b/guide/english/design-patterns/object-oriented-programming/index.md @@ -21,7 +21,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 you rcode 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 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). 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 a instance of a class.