(1) Learn to create class structure in C++ (2) Create an array of objects in C++ (3) Search and perform operations on the array of objects Project Description: The input csv file for this project consists of rows of data that deals with COVID-19 cases and deaths per day for each county in every state in the United States. Here is an example, date,county,state,fips,cases,deaths 2020-01-21,Snohomish,Washington,53061,1,0 2020-01-22,Snohomish,Washington,53061,1,0 2020-01-23,Snohomish,Washington,53061,1,0 For the purposes of this project, we will assume that the following are char* data types: date, county, and state. FIPS (unique identifier for each county) along with cases and deaths are int data types. Please note the comma delimiter in each row. You need to carefully read each field knowing that you will have a comma. You will use redirected input (more later) to read an input txt file that contains the following: counts //number of data entries in the csv file Filename.csv //this is the file that contains the covid-19 data Command //details of what constitutes a command is given below Command Command
. Your C++ program will read the counts value on the first line of the txt file, which represents the number of data entries in the csv file. (Note – the first line of the csv file contains descriptive variable fields, so there will be a total of [number of data entries + 1] lines in the csv file). Then, on the second line, it will read the Filename.csv and open the file for reading (more on how to do this in C++). After you open the file, you will read the data from each row of the csv file and create a COVID19 object. The COVID19 class is given below. You need to implement all of the necessary methods. class COVID19 { protected: char* date; char* county; char* state; int fips; int cases; int deaths; public: COVID19 (); //default constructor COVID19 (char* da, char* co, char* s, int f, int ca, int de); //initializer display (); //write all accessors and other methods as necessary }; After your write the above class you will write the following class: class COVID19DataSet { protected: COVID19* allData; int count; //number of COVID19 objects in allData int size; //maximum size of array public: COVID19DataSet (); //default constructor COVID19DataSet (int initSize); void display (); void addRow (COVID19& oneData); int findTotalCasesByCounty (char* county, char* state); int findTotalDeathsByCounty (char* county, char* state); int findTotalCasesByState (char* state); int findTotalDeathsByState (char* state); int findTotalCasesBySateWithDateRange (char* state, char* startDate, char* endDate); int findTotalDeathsBySateWithDateRange (char* state, char* startDate, char* endDate); ~COVID19(); //destructor //other methods as deem important }; The structure of the main program will be something like this: #include
Looking for solution of this Assignment?
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |