Question: This program below needs to be in C++ need before 2/23 thanks Write a program that determines which of five geographic regions within a major

This program below needs to be in C++ need before 2/23 thanks

Write a program that determines which of five geographic regions within a major city (north, south, east, west, and central) had the fewest reported automobile accidents last year. It should have the following two functions, which are called by main.

int getNumAccidents() is passed the name of a region. It asks the user for the number of automobile accidents reported in that region during the last year, validates the input, then returns it. It should be called once for each city region.

string findLowest() is passed the five accident totals and a 6th parameter that will have the value of the lowest total. It determines which is the smallest region and sets the lowest total parameter accordingly and returns the name of the lowest region.

double determine Average() - is passed the five accident totals. It returns the average number of accidents per region across the state.

Your program should output the name of the region with the lowest number of accidents, the lowest number of accidents, and the average number of accidents for the state. Note The rubric is now changing for the remainder of the term. Functions will be expected in all programs. Keep in mind having functions for input, processing, and output in all programs. The required functions may not be the only functions your program will use.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!