Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_methof_design
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rakesh.pv
factory_methof_design
Commits
7a0247e8
Commit
7a0247e8
authored
Feb 20, 2023
by
rakesh.pv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
factory v2
parent
82b88b60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
test4.py
+5
-1
No files found.
test4.py
View file @
7a0247e8
...
...
@@ -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 "
"
\n
2.sellHalf "
"
\n
3.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
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment