prog-obiektowe/python/net/hypki/Square.py

24 lines
468 B
Python
Raw Normal View History

'''
Created on Apr 4, 2023
@author: ahypki
'''
from net.hypki.Figure import Figure
from net.hypki.Area import Area
class Square(Figure, Area):
'''
classdocs
'''
def __init__(self, newName):
'''
Constructor
'''
super().__init__(newName)
def __str__(self):
return "Square with name= {0} has area= {1}".format(self.get_name(), self.compute_area())
def compute_area(self):
return 4.0