Chat with us, powered by LiveChat C++ Programming Internet Provider Anonymous Data Project | Wridemy

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.

Field Data Type
Customer ID string
StreamingMovies int
StreamingTV int
MultipleLines int
MonthlyCharges double
The fields are formatted as follows:

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.

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:

Define a ‘struct Customer’ data type with the fields and types from the above table.
In the output, include table column headings, correctly-spaced.
The total of all column widths and the spaces separating them should not exceed 80 spaces.
You can use either cin >> for the attributes or getline().
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.

Optional Input Redirection
To save some typing (of each customer every time you run the program), you can add all your input into a TXT file (for example, input.txt). Something ike this:

A111
1
0
1
29.95
Like that, but with all three customers and all 5 attributes. If you do this right, it will be 15 lines long. Store the file in the same folder as your CPP. Then when you run, do this on a Windows PC (we will discuss in class how to do this with Code::Blocks):

a.exe < input.txt ...or this on a Mac: ./a.out < input.txt Redirection Vs Serialization If you think that serialization looks a lot like redirection, you are right! But serialization gets its input from fin, and redirection from cin. Because of that, the cout prompts do appear when using redirection -- nothing you can do about that except ignore the prompts. It's only for your development purposes anyway. Submit your CPP for grading -- no TXT files please.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Wridemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order

Related Tags

Academic APA Writing College Course Discussion Management English Finance General Graduate History Information Justify Literature MLA