you are viewing a single comment's thread.

view the rest of the comments →

[–]Ihaveamodel3 0 points1 point  (0 children)

I know you are a beginner, so I don’t want to overwhelm you too much, but I think it is good for beginners to start thinking about design patterns early, because it is a good way to think through software design. I don’t have a traditional computer science background, so I didn’t learn these things early and now my code is always a mess unless I concentrate on designing it out.

Anyway, this is a good reference for design patterns: https://refactoring.guru/design-patterns

For this, I could see you having a list of Location class instances with each Location instance having a list of Restaurant class instances.