prog-obiektowe/python/net/hypki/Square.py
2023-04-04 18:13:13 +02:00

24 lines
468 B
Python

'''
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