Skip to content

Commit

Permalink
Create 10_oops_part2.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbharathram authored Jul 20, 2020
1 parent 1ac24e0 commit 4a85ad1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions 10_oops_part2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class Phones:

def __init__(self, brand, color):
self.brand = brand
self.color = color

def show_config(self):
print("Color: ", self.color)
print("Brand: ", self.brand)

class Iphones(Phones):
def __init__(self, brand, color, model):
super().__init__(brand, color)
self.model = model

def show_config(self):
super().show_config()
print("Model: ", self.model)

i = Iphones("Apple", "White", "Iphone 11")
i.show_config()

0 comments on commit 4a85ad1

Please sign in to comment.