cis 170 lab 7

A. Lab # CIS CIS170C-A7 B. Lab 7 of 7: Sequential Files C. Lab Overview – Scenario/Summary You will code, build, and execute a program that requires sequential files to create an address database. Learning Outcomes;1. Continue using a menu system with console applications;2. Be able to write a console application;3. Demonstrate entering, appending, storing, and retrieving records;4. Be able to write lines of output to a text file in order to create a report D. Deliverables Section Deliverable Points Step Program Listing and Output 45 E. Lab Steps Preparation: If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home. Locate the Visual Studio 2010 icon and launch the application. Lab;Step 1: Requirements: An Address Database Create a C++ console application that will store and retrieve names and addresses in a text file. The program should do the following.;1. It should accept a series of names and addresses from the console.;2. The user’s input should be written to a text file in the CSV format described in the lecture, but do not include the field names in the first row of the file.;3. Read the records from the text file, and display them in a user-friendly format.;4. Provide a menu to allow the user to append records to the file, display the records, or exit the application. Build upon the code below to complete the assignment.;#include;#include;#include;using namespace std;void menu(void);void writeData(void);void readData(void);string * split(string, char);const char FileName[] = “TestAddress.txt;int main ();menu();return 0;//end main;void menu(void);//allow user to choose to append records, display records or exit the program;//end menu;void writeData(void);//Write the Address Info to a file;//end write data;void readData(void);//read data from a file;//use the split function to break a;//deliminated line of text into fields;//end read data;string * split(string theLine, char theDeliminator);//Break theline into fields and save the fields to an array.;//Each field will occupy one element in a character array.;//theLine is a string with fields separated with theDeliminator character.;//Assumes the last field in the string is terminated with a newline.;//Useage: string *theFields = split(lineBuffer, ‘,’);//determine how many splits there will be so we can size our array;int splitCount = 0;for(int i = 0, i