Skip to content
Advertisement

Wrapper to Objects

This is a software design question. I have a folder like this:

JavaScript

Each of the countries has its own calendar, like so:

JavaScript
JavaScript

What I want is a wrapper to all of these countries’ calendars. In short, something like

JavaScript

I don’t want to hard code this. I just want to load all the calendars from the calendar folder into some wrapper. Maybe an enum class instead of a function? Not sure.

If no answer, any thoughts or resources where I can look for this?

Advertisement

Answer

You are looking for the Factory Pattern

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement