Skip to content

Commit 6879ad0

Browse files
authored
Update Day_13.md
1 parent 53be0ff commit 6879ad0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Status/Day_13.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,27 @@ print aSquare.area()
116116
----------------
117117
**My Solution: Python 3**
118118
```
119+
class Shape():
120+
def __init__(self):
121+
pass
122+
123+
def area(self):
124+
return 0
125+
126+
class Square(Shape):
127+
def __init__(self,length = 0):
128+
Shape.__init__(self)
129+
self.length = length
130+
131+
def area(self):
132+
return self.length*self.length
133+
134+
Asqr = Square(5)
135+
print(Asqr.area()) # prints 25 as given argument
136+
137+
print(Square().area()) # prints zero as default area
119138
```
139+
140+
## Conclusion
141+
142+
***Well It seems that the above problems are very much focused on basic concpets and implimantation of object oriented programming.As the concepts are not about to solve any functional problem rather design the structure , so both codes are very much similar in there implimantation part.***

0 commit comments

Comments
 (0)