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:
cin >>
for the attributes or getline().
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.