Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Problem 2 Overview: In this question, you will write a program that: 1. Reads a .csv file with up to 100 lines and
C++
\
Problem 2 Overview: In this question, you will write a program that: 1. Reads a ".csv" file with up to 100 lines and columns containing information on national parks. 2. Stores the information in an array of structs. 3. Writes the lines into the output .csv file where the area of the park is within a range specified by the lower bound and upper bound. 4. Prints the content of the entire array. Specifics: Create an array that holds the Park struct objects. Use the following struct declaration: struct Park{ string parkname; string state; int area; 2A. Write a function named addPark: 1. The addPark function has the following declaration: 1/ length: Number of items currently stored in the array void addPark (Park parks[], string parkname, string state, int area, int length); ii. Instantiate a struct and store the parkname, state, and area values in it. iii. Add the struct to the parks array. 2B. Write a function named printList: i. The printList function has the following signature: // length: Number of items in the array void printList(const Park parks[], int length); ii. Loop through the parks array. iii. Print out each element of the parks array in the following format. "Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started