Commit 7a0247e8 by rakesh.pv

factory v2

parent 82b88b60
......@@ -19,6 +19,9 @@ class Selling_plan(ABC):
pass
# there are my concrete classes
# that has abstractmethod inherited from interface selling_plan()
class SellAll(Selling_plan):
def sell_crypto(self, x: float, y: float):
......@@ -69,6 +72,7 @@ choice = int(input(" enter selling option "
"\n2.sellHalf "
"\n3.sellLittle \n"))
# this is my client which call my factory class
client = TradingApp().create_object(choice)
print(client.sell_crypto(x,y))
print(client.sell_crypto(x, y))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment