Do I have a possibility to use Flyweight Pattern for this scenario
So I have a order management system
CustomerOrder will have multiple food items and a Customer
22 Replies
⌛
This post has been reserved for your question.
Hey @Rag...JN 🌌 🦡 👽 💰! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Now the CustomizedOptions have multiple sub classes according to the food type
so if the food name is Pizza, it will have CustomizedPizzaOptions,
if the food name is Burger, it will have CustomizedBurgerOptions
Sub classes
Usage and building of an order
Once the CustomizedOptions is created here I added the values to the map too, ignore the UI implementation. the point is I added key and value pairs to the map here. Which is useful when you want to show details dynamically.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
What specifically do you want to use the flyway pattern for here?
and why?
it goes with a Java Swing application
Second question for the assignment is to apply Flyweight pattern for the application
When choosing customized food options
I revealed my solution in the general chat
?
I mean, you might be able to use it for the
CustomizedOptions
if you assume that the same CustomizedOptions
typically occur multiple timesyah
when you open the same panel again and again
then use it for the
CustomizedOptions
I shared the solution in the general, my search is not working
you mean you already solved it?
yah
I guess I figured out the Interpreter Pattern for my application
probably that thing
but if you solved it, I don't need to help you I guess
this is interpreter
yah it went inactive so I didn't close it
==========
I implemetned the Flyweight pattern
So I created a Factory
yes sir
it's fine, I just saw the thing in #help-notifications lol
thank you for being kind enough to looking into the thread
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@910524060771971103>.