Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Hey Im really stuck on this lab can you how me a answer that will work on zybooks in C + + please and thank

Hey Im really stuck on this lab can you how me a answer that will work on zybooks in C++ please and thank you Here is the starting default code #include
#include
#include
//FIXME: stream manipulation library
using namespace std;
// Function Declarations
void createAuthorDataFile(string fileName);
//FIXME: declare the get header function
//FIXME: declare the make table function
//FIXME: declare the make histogram function
int main()
{
// Variables
// FIXME: What variables are needed in main()? Define them below
getHeader(dataTitle, columnHeader1, columnHeader2);
createAuthorDataFile("novels.txt");
//FIXME: call the make table function
//FIXME: call the make histogram function
return 0;
}
//open outFS and put the user data into the file
void createAuthorDataFile(string fileName)
{
int numNovels;
string authorName;
ofstream outFS;
outFS.open(fileName);
cout "Enter a data point (-1 done to stop input):" endl;
cin >> numNovels;
cin.ignore();
getline(cin, authorName);
while (numNovels !=-1 && authorName != "done"){// to stop enter -1 done
// display data to screen
cout "Data string: " authorName endl;
cout "Data integer: " numNovels endl;
// write data to file
outFS numNovels "";
outFS authorName endl;
// get data for the next author
cin >> numNovels;
cin.ignore();
getline(cin, authorName);
}
outFS.close();
cout endl;
}
// get title for data and columns headers
//FIXME: define the get header function
//open outFS and put the user data into the file
//FIXME: declare the make table function
//make table and output data onto table
//FIXME: declare the make histogram function
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions