Implemented the Singleton design pattern to the COVID19PY application.
Introduced a private constructor and a get instance method to ensure only one instance of Covid19Py is allowed.
Create an instance example
previous way:
covid19 = COVID19Py.COVID19()
new way:
covid19 = COVID19Py.COVID19.getInstance()
implemented setter methods for data source and url instead of passing arguments through the constructor
What does this implement?
Implemented the Singleton design pattern to the COVID19PY application. Introduced a private constructor and a get instance method to ensure only one instance of Covid19Py is allowed.
Create an instance example previous way: covid19 = COVID19Py.COVID19()
new way: covid19 = COVID19Py.COVID19.getInstance()
implemented setter methods for data source and url instead of passing arguments through the constructor