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

A design suggestion #4

Open melina-maria opened 3 years ago

melina-maria commented 3 years ago

Hello, nice to meet you. I am doing a task regarding the use of design patterns and I stumble upon your project. While I was analyzing it I could notice that you were performing several iterations with the use of a for loop and although within the implementation that you are giving it is correct, I think that to suggest that if you use the Iterator design pattern it does not represent any harm, since, you can in the same way, go through the collection but do not expose the representations of the objects(list, stack, tree, etc.).The good thing about using this design is that more collections can be added as the system grows and it will not suffer any damage!

Next I attach a UML diagram with a design that follows this pattern. Diagrama en blanco (4)

I hope this suggestion is taken positively and if it is found to be wrong in any way I apologize in advance, as I am just gaining knowledge about design patterns and their structure. I hope you have a great day. Thank you

swapnanildutta commented 3 years ago

Actually, this is great. you may edit the README and add this UML diagram to it. Thanks a lot, @melina-maria.

You can also make it a bit colorful and with a transparent background, which would be great to look at aesthetically. 😉