Replies: 4 comments 3 replies
-
@XiWang16, I think you can implement a makeshift builder for profile as you have numerous attributes that need to be set independently. The builder can set each of these attributes. |
Beta Was this translation helpful? Give feedback.
-
@lancenigel, Consider implementing a strategy design pattern for your matchingalgorithm. |
Beta Was this translation helpful? Give feedback.
-
@tankenji As Hafsa suggested, you can implement the Singleton design pattern for the UserDatabase because there should only be a single instance of the database to which all other classes should refer. |
Beta Was this translation helpful? Give feedback.
-
Just a general design pattern to keep in mind for next time - observer pattern! This way any changes made by a subject entity can be observed by its observers and notified immediately. This could apply to the changes made for profile and the observer being the study spot class. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Design Principles and Patterns
Please freely share ideas and opinions on your own/others' codes regarding design principles and patterns to improve our project!
➡️ You can comment on pull requests or just throw suggestions on what design patterns would fit to certain functions!
Beta Was this translation helpful? Give feedback.
All reactions