# Python has no interfaces
# therefore, the example uses abstract classes
from abc import *
class Shape(ABC):
@abstractmethod
def get_area(self):
pass
@property
@abstractmethod
def line_count(self):
return 0
class Square(Shape):
def __init__(self, s_length):
self.sideLength = s_length
def get_area(self):
return self.sideLength * self.sideLength
@property
def line_count(self):
return 4
square = Square(5)
area = square.get_area()
# area is 25
print(area)