Final answer:
The C++ CovidDB class is designed to manage a hash table of COVID-19 data entries. It provides functionalities to add, retrieve, update, and remove data based on country and date. It processes cumulative data from a CSV file and user inputs, updating entries with newer information as required.
Step-by-step explanation:
The task involves designing and implementing a C++ class named CovidDB to manage COVID-19 data using a hash table with separate chaining collision resolution. The CovidDB class should support operations to add, retrieve, and remove DataEntry objects, each representing a country's COVID-19 data on a specific date. Additionally, the class should be able to parse cumulative data from a CSV file and update entries with more recent data.
To implement this, you would define the DataEntry class with appropriate private members for date, country, cumulative cases, and deaths, along with the necessary getters and setters. The CovidDB class would then contain a hash table of DataEntry lists, keyed by country names. The add() function inserts a new entry or updates an existing one, get() retrieves an entry by country, returning nullptr if not found, and remove() deletes an entry by country.
The hash function provided will calculate a unique index for each country. To build the initial table, you should process the WHO-COVID-Data.csv to sum up cumulative cases and deaths by the latest date in the file for each country and insert these as single entries in the hash table. The add() function should be later modified to accommodate updates that reflect new, more recent data. The instructor interface would provide the user with options to interact with the CovidDB instance, initiating these operations.