❔ Factory Design method pattern
Hello! Can some one help me with Factory Method, I am working on RPN Calculator project and need to use this design method but I don't understand how it works and how to implement it. ChatGPT gave me a solution but i want to learn how it works.
5 Replies
I don't see factory anywhere.
// not sure how to do it because the type is return double and not voidI don't know what 'it' is - your code seems ok Div:
yeah I don't know how to implement factory to my code
The factory method would be,
switch block or switch expression would be 'cleaner'. Also not sure what you're using for the key - I just used
string name
as an exampleyes thanks for your help!!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.