Question: please make sure your work is correct, please notify me where should I put the input and the output file Objectives: 1. Read the contents




please make sure your work is correct, please notify me where should I put the input and the output file
Objectives: 1. Read the contents of a datafilel one record at a time 2. Process the data that was read from the datafile one record at a time; 3. Print a record to a datafile using an ofstream object; 4. Be able to use the fstream library; 5. Be able to use records (class with only data); 6. Be able to use an ifstream object; 7. Be able to use an ofstream object; This assignment is an extension of Assignment#2 You will implement a program called "call_stats3.cpp" to process customer call records. Each customer call record contains seven fields, which are as follows: 1) a ten digit cell phone number (string, no dashes), 2) the number of relay stations used in making the call (integer), 3) the length of the call in minutes (integer), 4) the net cost of the call (double), 5) the tax rate (double), 6) the call tax (double) and 7) the total cost of the call (double). Your program will have 3 functions: Input, Process and Output. Your main program will call each function until the end of the datafile has been read. Each call record will be printed to a data file Following are the descriptions of the functionality of each function 1. The void function "Inpuf" will have two parameters: an input file stream called "in", and a customer call record called "call records". The function will read the cell_number, relays, and call_length, in minutes, into the a call record from the data file 2. The function "Process" will calculate the net cost of a call (net cost), the tax on a call (call tax) and the total cost of the call (total cost) using the number of relay stations (relays) and the length in minutes of the call (call length) for a call record. Please consider the following a. The tax rate on a call (call tax) is simply based on the number of relay stations (relays) used to make the call (0 relays
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
