You are to implement a C++ class that can read a text file containing the number of cases of the ongoing Covid-19 pandemic in different countries and answer some questions based on the data. The file is in the following format:
Column 1 is the Country name, column 2 is the number of days since the first case, and column 3 is the number of cases. E.g., Afghanistan had 1 case on Day 0 and 5 cases on Day 15. Note that the data may not be sorted.
Implement your logic within a class CovidData. The class should have the following public member functions:
You are free to add other (public/private) member variables and functions to class CovidData, and any other structs/classes as needed.
mystream >> mycountry >> ndays >> ncases;
Data structure resources:
Documentation:
File submission:Uploadas separate files (do not zip):
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here