You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi again. I was checking the code that you use for "045_BillyBurger" and I think about something you can use: Well, you want to operate with hamburgers with the class "Hamburger" where within it are different attributes of type String representing the additional ones with which to order the hamburger, be they drinks, potatoes, etc. And Hamburger's heritage branch does the same. Since being as Strings the functionality is limited, implementing the Composite pattern would be able to operate the hamburgers together with their additional ones as simple objects if desired or work them as a single as a "combo" through a recursive composition where a in turn, the client could operate with these types of objects indistinctly, citing as an example the calculation of the total to pay for all the food ordered. I add the uml class diagram to illustrate the design:
Hope you're fine and have a nice day
The text was updated successfully, but these errors were encountered:
Hi again. I was checking the code that you use for "045_BillyBurger" and I think about something you can use: Well, you want to operate with hamburgers with the class "Hamburger" where within it are different attributes of type String representing the additional ones with which to order the hamburger, be they drinks, potatoes, etc. And Hamburger's heritage branch does the same. Since being as Strings the functionality is limited, implementing the Composite pattern would be able to operate the hamburgers together with their additional ones as simple objects if desired or work them as a single as a "combo" through a recursive composition where a in turn, the client could operate with these types of objects indistinctly, citing as an example the calculation of the total to pay for all the food ordered. I add the uml class diagram to illustrate the design:
Hope you're fine and have a nice day
The text was updated successfully, but these errors were encountered: