2020-06-09 15:21:36 +02:00
|
|
|
from coder import create_image
|
2020-06-09 18:22:14 +02:00
|
|
|
from assigning import assigning
|
2020-06-09 15:21:36 +02:00
|
|
|
|
|
|
|
|
2020-05-19 17:45:15 +02:00
|
|
|
class Product:
|
|
|
|
|
|
|
|
def __init__(self, color, shape, mass, size):
|
|
|
|
self.color = color
|
|
|
|
self.shape = shape
|
|
|
|
self.mass = mass
|
2020-06-09 15:21:36 +02:00
|
|
|
self.size = size
|
|
|
|
|
|
|
|
|
|
|
|
class FinalProduct:
|
|
|
|
|
|
|
|
def __init__(self, color, shape, mass, size, name):
|
|
|
|
self.color = color
|
|
|
|
self.shape = shape
|
|
|
|
self.mass = mass
|
|
|
|
self.size = size
|
|
|
|
self.name = name
|
|
|
|
|
|
|
|
if size == 'small':
|
|
|
|
self.price = 2.99
|
|
|
|
|
|
|
|
if size == 'medium':
|
|
|
|
self.price = 3.99
|
|
|
|
|
|
|
|
if size == 'big':
|
|
|
|
self.price = 4.99
|
|
|
|
|
|
|
|
self.img = create_image(self)
|
2020-06-09 18:22:14 +02:00
|
|
|
|
2020-06-09 21:57:37 +02:00
|
|
|
def shelf(self, shelfs):
|
|
|
|
return assigning(self.img, shelfs);
|