Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Please. Thank you! (10 points) Consider the following records stored in data.txt text file and declarations. data.txt text file. Each record consists of

image text in transcribed

In C++ Please. Thank you! (10 points) Consider the following records stored in "data.txt" text file and declarations. "data.txt text file. Each record consists of declarations president's name, president's years served, struct person and wife's name { string presName; Joe_Biden 2021-present Jill string yearsServed Jimmy_Carter 1977-1981 Rosalynn string wifeName; Ronald_Reagon 1981-1989 Nancy George Bush 1989-1993 Barbara | }; Bill_Clinton 1993-2001 Hillary person presidents[6 ]; George_W_Bush 2001-2009 Laura Write a program to do the following | a. Function copyData("data.txt, presidents); to copy records from file data.txt into array presidents Name Years Served Wife's Name b. Function displayAll(presidents); to display a 3 columns Joe_Biden............2021-present............Jill Table (use members) with heading: Jimmy_Carter...... 1977-1981...... Rosalynn Ronald Reagon.... 1981-1989. .....Nancy Name, Years Served, and wife's Name George_Bush....... 1989-1993........Barbara Format your output so that all names and years Bill_Clinton.......... 1993-2001...... ....Hillary served line up left justified. The wife's name must George_W_Bush.. 2001-2009......... Laura end up at the same column by using right justification function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

LO2 Distinguish among three types of performance information.

Answered: 1 week ago