'Remobin python for fun'

This commit is contained in:
Arkadiusz Hypki 2023-04-04 15:32:36 +02:00
parent fb1e53e9f9
commit 68b370241f
8 changed files with 0 additions and 117 deletions

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wmii-prog-obiektowe-python</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

View File

View File

@ -1,18 +0,0 @@
'''
Created on Apr 4, 2023
@author: ahypki
'''
class Area():
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
def compute_area(self):
pass

View File

@ -1,27 +0,0 @@
'''
Created on Apr 4, 2023
@author: ahypki
'''
class Figure():
'''
classdocs
'''
__name = '';
def __init__(self, newName = 'Default __name'):
'''
Constructor
'''
self.__name = newName;
def get_name(self):
return self.__name
def set_name(self, value):
self.__name = value
def __str__(self):
return "Figure with name= {0}".format(self.__name)

View File

@ -1,23 +0,0 @@
'''
Created on Apr 4, 2023
@author: ahypki
'''
from net.hypki.Figure import Figure
from net.hypki.Square import Square
if __name__ == '__main__':
f = Figure()
f.__name = "New name"
f2 = Figure('Another name')
print(str(f))
print(str(f2))
s1 = Square('Square1')
print(str(s1))
# print(str(s1.__name)) # will not work
print(s1.get_name())
print('Finished!')

View File

@ -1,24 +0,0 @@
'''
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