C++ Programming Internet Provider Anonymous Data Project

HR Management Hundred Years’ Shifts In Type Of Jobs And Implications
June 29, 2019
Jesus Death And Resurrection Application Of The Paschal Mystery
June 29, 2019

C++ Programming Internet Provider Anonymous Data Project

Question Description

Imagine a fictitious Internet provider that keeps the following “anonymized” data about each of their customers and the services they purchase. The data is anonymous, as many modern data sets are, to allow the data to be processed with fewer privacy concerns.


Customer 
ID takes the format one letter A-Z followed by 5 numbers 0-9. For example, A123, B777, C817 are all valid Customer IDs.The fields are formatted as follows:

StreamingMovies, StreamingTV and MultipleLines are boolean values represented by 0 (false) or 1 (true). For example, if the customer record has ‘1’ for a StreamingMovies value, it means the customer subscribes to the StreamingMovies service.

MonthlyCharges is a floating point value, representing the customer’s monthly bill.

Write a C++ console program that prompts a user to enter attributes for three customers, and outputs the collected data in a formatted table.

Since the code block to prompt the user for attributes and cin and store their values is to be used three times instead of just one, write a generic value-returning function to do all that and return a ‘Customer’ data structure (struct). Call it three times from main — once for each customer.

You may write a void function to output the result for a Customer struct, passed as a parameter to the function. Or do so in a code block in main — your choice.

Here are other requirements:

  1. Define a ‘struct Customer’ data type with the fields and types from the above table.
  2. In the output, include table column headings, correctly-spaced.
  3. The total of all column widths and the spaces separating them should not exceed 80 spaces.
  4. You can use either cin >> for the attributes or getline().
  5. Serialize down to customers.txt as the last thing that your program does. If you do this right, the file should have 15 lines — 5 for each of the 3 objects.

We will not fully implement serialization in this assignment. But to prepare for it in later assignments, you’ll include “serializing down” int his one. It will have no effect on the program, because you won’t be serializing up. But it’s done this way here to get you used to making sure that serializing down works right before attempting add serializing up in all future work.