swapnanildutta / Student-Database

This is the project I made during my 10th standard examination (ICSE) in Java.
MIT License
0 stars 0 forks source link

Yet another design suggestion #6

Open ghost opened 3 years ago

ghost commented 3 years ago

Suggestion

I think for better abstraction of the program, you should split some Students variables into new classes like Records for example. And make use of creational pattern designs that lets you be clear on how you would create your objects and later on their usage.

Factory Method design pattern

Factory Method is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created. https://refactoring.guru/design-patterns/factory-method

Suggestion - UML Diagram

asdadad In this suggestion, I added some additional classes to explain a little better my suggestion. The great property that the factory method has is that makes the code easier to refactor or support.

Regards

Thanks for paying attention. Keep up the great work!

issue-label-bot[bot] commented 3 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

swapnanildutta commented 3 years ago

Thanks a lot, @andrestoala. You may add this diagram to the README. This is great actually.