Create a C++ program that will quantify and summarize Divvy Bike trip data, usin

Create a C++ program that will quantify and summarize Divvy Bike
trip data, using Zybooks
section 8.2. Your program will have options to analyze the dataset as a
whole and to analyze patterns and similarities between a weekday (September 1st) and a
weekend (September 4th). Running your program will look like what is shown below, also
available as a google
doc:
Changes made Thursday 10/21:
1.
New datafile uploaded to Zybooks, small enough to be usable in that
environment. Sample output recreated to reflect results when using that new smaller
dataset.
2.
Datafile selection sub-menu: Option 2 no longer refers to the
second datafile as having “50,000+” rides. A new menu option 3 is
given to refer to the full dataset, which you may want to use for your own
exploration, even though it will not be tested in Zybooks.
3.
Notes include hints on how to convert a string to an integer or
double
4.
Menu option 4 (week day vs. weekend) submenu option 2 now is: 2. Proportional
50 column graph with @ for weekday and + for weekend
Notes
You
will need to convert strings to numerical values for some parts of your
program. Here is an example of how to do this, assuming it runs in a C++
program that has #include
at the top:
string
s1 = “32767”;
string
s2 = “3.14159”;
int
integerValue = stoi( s1); // Convert
string s1 to integer, giving 23767
double
doubleValue = stod( s2); // Convert
string s2 to double, giving 3.14159
Your
program must present the following six menu options:
Select
a menu option:
1.
Select datafile, display rides totals and clean data
2.
Display overall trip information.
3.
Display percentage of members vs. casual riders
4.
Display weekday vs weekend usage
5.
Extra Credit: find closest station
6.
Exit
Your
choice –>
The
user must select menu option 1 (select data file…) prior to selecting any
other menu options. Failing to do so results in an error message prompting the
user to first choose menu option 1.
Menu Option 1
Select
the file you would like to read data from. When menu option 1 is selected, your
program will then prompt for a sub-menu option asking for which data file to be
used, as follows:
Select
datafile:
1. Small subset of data with 14 rides to help
create your program
2. Week day vs weekend rides
3. All September 2021 data (not tested in
Zybooks)
Your
selection–> 1
Total
# of trips found in datafile: 13
Total
# of trips in clean data: 10
The
sample above shows how after the datafile is read, your program then displays
the total number of trips in the datafile, along with the number of trips
considered “clean” data, where all fields for that trip have values
in them. Subsequent steps all use the clean data.
Menu Option 2
Provides
the following general information on the cleaned data
§ Total # of miles traveled
§ Average length of trips in miles
§ Longest trip ID, start and end locations and distance in miles
This
looks like the following:
Total
# of miles traveled: 12
Average
length of trips in miles: 1.2
Longest
trip information below:
——————————-
Trip
ID: B465E78B601DB5A8
Trip
start location: Broadway & Belmont Ave
Trip
end location: Broadway & Thorndale Ave
Trip
distance in miles: 3.5
Menu Option 3
Display
the percentage of casual vs member riders. This looks like the following:
Casual
Rider Percentage: 40.0%
Member
Rider Percentage: 60.0%
Menu Option 4
Compute and display the number of
trips by hour, comparing Divvy bike data for September 1st and 4th. This has a sub-menu as follows:
Select type of display:
1. Counts of rides per hour in the day
2. Proportional 50 column graph with @ for
weekday and + for weekend
Your selection–> 1
LargestNumberOfRides is: 1317
Rides per hour for weekday and weekend:
0: 66 324
1: 26 245
2: 18 122
3: 7 55
4: 16 36
5: 86 42
6: 301 70
7: 565 144
8: 556 275
9: 382 437
10: 311 671
11: 402 770
12: 495 915
13: 428 852
14: 436 819
15: 602 881
16: 845 876
17: 1317 822
18: 1093 751
19: 821 611
20: 533 461
21: 442 376
22: 305 477
23: 174 375
Selecting
the sub-menu option 2 gives an ASCII graphics scaled graph. To create this
graph first find the largest number of rides for any hour of either the weekday
or weekend. For each displayed value figure out what it is as a fraction of
this largest value. Multiply that by 50 to give the number of characters to be
displayed. See the google doc sample output near the top of this page for
sample output after choosing this menu option.
Menu Option 5 (Extra Credit)
Search
Google to find a really nice home in Chicago you would like to live in. In
Google maps and click on that home to create a “pin” at that spot.
Then right-click on the pin to display location information. Click on the
latitude, longitude information shown to copy those numbers. Use those numbers
as input to your program, which then should figure out and display the Divvy
station closest to that location. See the google doc sample output near the top
of this page for sample output after choosing this menu option.
Menu Option 6
Exit
the program.
Run the program, again and again, to make sure you know what’s going on, then write c++ in your own version(function names, variable).
After you finish, write 500 words to compare why you chose that version, and why it’s better than the solution program.
You can work on the startercode that I attached.

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount