Demonstrate entering appending storing and retrieving


Lab Assignment: Sequential Files

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.

Lab Steps

Preparation:

If you are using the Citrix remote lab, follow the login instructions located in the lab area in Course Home.

Locate the Visual Studio 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 lesson, but do not include the field names in the first row of the file. Use a delimiter to separate the records.

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.

Step 2: Processing Logic

Using the pseudocode below, write the code that will meet the requirements.

The pseudocode for the writeData function is shown below.

The program input should appear similar to this.

Append Records

Name..........John Smith
Street.........902 Union Ave
City............Any Town
State...........TX
Zip Code......78552

"Enter another Record? (Y/N) "
The file structure should look like this.
John Smith, 902 Union Ave, Any Town, TX, 79552
Eric Jones, 345 State Way, Fresno, CA, 93432
...

The file output should appear similar to the following.

Show Records

Record #1
Name...........John Smith
Street..........902 Union Ave
City.............Any Town
State...........TX
Zip Code......78552

Record #2
Name...........Eric Jones
Street..........345 State Way
City.............Fresno
State...........CA
Zip Code.......93432

(A)ppend Records, (S)how Records, (E)xit

Step 3: Create a New Project

Create a new project and name it LAB7. Write your code using the processing logic in Step 2. Make sure you save your program.

Step 4: Compile and Execute

a) Compile your program. Eliminate all the syntax errors.

b) Build your program and verify the results of the program. Make corrections to the program logic, if necessary, until the results of the program execution are what you expect.

Step 5: Print Screenshots and Program

1. Capture a screen print of your output.(Do a print screen and paste into an MS Word document.)
2. Copy your code and paste it into the same MS Word document that contains the screen print of your output.
3. Save the Word document as Lab07_LastName_FirstInitial.

Attachment:- Lab-Instructions.rar

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Demonstrate entering appending storing and retrieving
Reference No:- TGS02335352

Expected delivery within 24 Hours