This is functionally the exact same as the original. The big difference is that an aggregate pattern has been applied to the code. Essentially 3 classes have been added to the covid19.py file. The CaseOccurrence class acts as the root. The caseLocation and the covidCases classes contain the getLocationByCountry and getLatest methods that are identical to the original however they are now used in the CaseOccurence class, which provides encapsulation. An instance of CaseOccurence is made in the main class and used in the respective methods (in order for the software to perform the same functions as in the originals).
This is functionally the exact same as the original. The big difference is that an aggregate pattern has been applied to the code. Essentially 3 classes have been added to the covid19.py file. The CaseOccurrence class acts as the root. The caseLocation and the covidCases classes contain the getLocationByCountry and getLatest methods that are identical to the original however they are now used in the CaseOccurence class, which provides encapsulation. An instance of CaseOccurence is made in the main class and used in the respective methods (in order for the software to perform the same functions as in the originals).