Question: This assignment is an extension of Assignment#1. You will implement a program called call_stats.cpp to process customer call records. Each customer call record contains seven

This assignment is an extension of Assignment#1. You will implement a program called "call_stats.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. Following are the descriptions of the functionality of each function

This assignment is an extension of Assignment#1. You will implement a program

called "call_stats.cpp" to process customer call records. Each customer call record contains

INPUT STREAM:

seven fields, which are as follows: 1) a ten digit cell phone

FORMAT of OUTPUT:

number (string, no dashes), 2) the number of relay stations used in

I. The void function Inpu " 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 (050 then call tax =12%) b. The net cost ofa call is calculated by the following formula: net cost -(relays /50 x 0.40 x call length)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!