24 lines
468 B
Python
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
|