C++ homework project

(1) Apprentice to actualize chic anatomy in C++ (2) Actualize an arrangement of altar in C++ (3) Search and accomplish operations on the arrangement of objects Project Description: The ascribe csv book for this activity consists of rows of abstracts that deals with COVID-19 cases and deaths per day for anniversary canton in every accompaniment in the United States. Actuality 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 accept that the afterward are char* abstracts types: date, county, and state. FIPS (unique identifier for anniversary county) forth with cases and deaths are int abstracts types. Please agenda the breach delimiter in anniversary row. You charge ­­­to anxiously apprehend anniversary acreage alive that you will accept a comma. You will use redirected ascribe (more later) to apprehend an ascribe txt book that contains the following: counts  //number of abstracts entries in the csv file Filename.csv  //this is the book that contains the covid-19 data Command  //details of what constitutes a command is accustomed below Command Command …. Your C++ affairs will apprehend the counts amount on the aboriginal band of the txt file, which represents the cardinal of abstracts entries in the csv file. (Note - the aboriginal band of the csv book contains anecdotic capricious fields, so there will be a absolute of [number of abstracts entries + 1] curve in the csv file). Then, on the additional line, it will apprehend the Filename.csv and accessible the book for account (more on how to do this in C++). Afterwards you accessible the file, you will apprehend the abstracts from anniversary row of the csv book and actualize a COVID19 object. The COVID19 chic is accustomed below. You charge to apparatus all of the all-important 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 alternative methods as necessary }; After your address the aloft chic you will address the afterward class: class COVID19DataSet { protected: COVID19* allData; int count; //number of COVID19 altar in allData int size; //maximum admeasurement of array public: COVID19DataSet (); //default constructor COVID19DataSet (int initSize); void affectation (); 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 account important }; The anatomy of the capital affairs will be article like this: #include <iostream> using namespace std; // Address all the classes here int capital () { int counts; // cardinal of annal in Filename.CSV int command; COVID19 oneRow; //read the filename, for example, Filename.csv //open the Filename.csv application fopen (google it for C++ to acquisition out) //assume that you called this book as myFile //read the aboriginal accumulation in the book that contains the cardinal of rows //call this cardinal counts COVID19DataSet* myData = new COVID19DataSet (counts); for (int i=0; i < counts; i++) { //read the ethics in anniversary row //use setters to set the fields in oneRow (*myData).addRow (oneRow); } //end for loop while (!cin.eof()) { cin >> command; switch (command) { case 1: { //read the blow of the row (*myData).findTotalCasesByCounty (county, state); break;  } case 2: {  //do what is bare for command 2  break;  } case 3: {  //do what is bare for command 3  break;  } case 4: {  //do what is bare for command 4  break;  } case 5: {  //do what is bare for command 5  break;  } case 6: {  //do what is bare for command 6  break;  } default: cout << “Wrong command\n”; } //end switch } //end while delete myData; return 0; } Input Structure: The ascribe txt book will accept the afterward anatomy – I accept annotated actuality for compassionate and these annotations will not be in the absolute ascribe file. Afterwards the aboriginal two lines, the absolute curve in the ascribe txt book contains commands (one command per line), area there can be up to 6 altered commands in any adjustment with any cardinal of entries. The command is adumbrated by an accumulation [1 to 6] and can be begin at the alpha of anniversary line. counts // Cardinal of abstracts entries in the csv file  Covid-19-Data-csv  // Name of the ascribe book that contains the absolute Covid-19 abstracts by canton and state 1 Cleveland, Oklahoma //command 1 actuality is for findTotalCasesByCounty 1 Walla Walla, Washington  1 San Francisco, California 1 Tulsa, Oklahoma 2 Oklahoma, Oklahoma //command 2 actuality is for findTotalDeathsByCounty 2 Miami, Ohio 2 Miami, Oklahoma 3 Oklahoma //command 3 actuality is for findTotalCasesByState 3 North Carolina 4 New York //command 4 actuality is for findTotalDeathsByState 4 Arkansas 5 Oklahoma 2020-03-19 2020-06-06 //5 actuality is for findTotalCasesBySateWithDateRange 6 New York 2020-04-01 2020-06-06 //6 actuality is for findTotalDeathsBySateWithDateRange Redirected Input Redirected ascribe provides you a way to accelerate a book to the accepted ascribe of a affairs afterwards accounting it application the keyboard. To use redirected ascribe in Visual Studio environment, chase these steps: Afterwards you accept opened or created a new project, on the card go to project, activity properties, aggrandize agreement backdrop until you see Debugging, on the appropriate you will see a set of options, and in the command arguments blazon “< ascribe filename”. The < assurance is for redirected ascribe and the ascribe filename is the name of the ascribe book (including the aisle if not in the alive directory). A simple affairs that reads appearance by appearance until it alcove end-of-file can be begin below. #include <iostream> using namespace std; //The appearance for end-of-line is ‘\n’ and you can analyze c beneath with this  //character to analysis if end-of-line is reached. int capital () { char c; cin.get(c); while (!cin.eof()) { cout << c; cin.get(c); } return 0; } C String A cord in the C Programming Language is an arrangement of characters ends with ‘\0’ (NULL) character. The NULL appearance denotes the end of the C string. For example, you can acknowledge a C cord like this: char aCString[9]; Then you will be able to abundance up to 8 characters in this string. You can use cout to book out the cord and the characters stored in a C cord will be displayed one by one until ‘\0’ is reached. Actuality are some examples: 0 1 2 3 4 5 6 7 8 cout result Length u s e r n a m e \0 username 8 n a m e \0 name 4 n a m e \0 1 2 3 4 name 4 \0 (nothing) 0 Similarly, you can use a for bend to actuate the breadth of a cord (NULL is NOT included). We appearance this in the afterward and additionally appearance how you can dynamically actualize a cord application a pointer char aCString[] = "This is a C String."; // you don’t charge to provide // the admeasurement of the array // if the agreeable is provided char* anotherCString; // a arrow to an arrangement of // characters unsigned int breadth = 0; while( aCString[length] != '\0') { length++; } // the breadth of the cord is now known anotherCString = new char[length+1]; // charge amplitude for NULL character // archetype the string for( int i=0; i< length+1; i++)  anotherCString[i] = aCString[i];  cout << aCString << endl; // book out the two strings cout << anotherCSring << endl; delete [] anotherCString; // absolution the anamnesis afterwards use You can analysis http://www.cs.bu.edu/teaching/cpp/string/array-vs-ptr/, alternative online sources or textbooks to apprentice added about this. Output Structure Stay acquainted for the exact architecture in which the achievement of your affairs should be formatted. For now, it is recommended to alpha alive on account in the ascribe files, autumn the data, and accessing the abstracts based on the accustomed commands. Constraints 1. In this project, the alone attack you will use is #include <iostream> and application namespace std. 2. None of the projects is a accumulation project. Consulting with alternative associates of this chic our gluttonous coding solutions from alternative sources including the web on programming projects is carefully not accustomed and appropriation accuse will be imposed on acceptance who do not chase this. Rules for Gradescope (Project 1): 1. Acceptance accept to admission GradeScope through Canvas application the GradeScope tab on the left, or by beat on the Activity 1 appointment acquiescence button. 2. Acceptance should upload their affairs as a distinct cpp book and cannot accept any attack files. If, there are attack files (for classes) you charge to amalgamate them to a distinct cpp book and upload to GradeScope. 3. Acceptance accept to name their distinct cpp book as ‘project1.cpp’. All lower case. The autograder will brand this alone if your affairs is adored as this name. 4. Sample ascribe files and achievement files are given. Your achievement should EXACTLY bout the sample achievement book given. Please analysis the spaces and new curve afore your email us cogent that the ‘output absolutely matches but not casual the analysis cases’. Suggest application some blazon of argument allegory to analysis your achievement with the expected. 5. Acceptance charge to accept alone one attack file(iostream) while uploading to GradeScope. You cannot accept ‘pch.h’ or ’stdafx.h’. 6. Acceptance cannot accept 'system pause' at the actual end of the cpp file.

Order a unique copy of this paper

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
Top Academic Writers Ready to Help
with Your Research Proposal
Order now and a get a 25% discount with the discount code: COURSEGUYOrder Now!
+ +