Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help reading and writing to a file while also formatting the output. Console Application Create a C++ console application. It should contain at least

Need help reading and writing to a file while also formatting the output.

image text in transcribed

image text in transcribed

Console Application Create a C++ console application. It should contain at least the following files . A cop file for the main function. . A.h file for the tip function prototypes. . A cop file for the tip function definitions. Main Function Specifications The main function should read/write data to/from the files. It should use CalculateFinalbil function to calculate the final bill amount for each record (set of data for one bill). It needs to be able to read all data from the input file no matter how many records there. It should not be necessary to recompile the program for it to work with a different number of records from the input file. All output data should be written to an output file and not the screen. Functions Write the following functions as part of your program. Remember to properly create them using.h/.spa files. Function Specifications Signature Description doubre Sasuatt amount,tax percentage annts double This function calculates a final bill given a bill amount, tax percentage and tip percentage There should be NO input or output statements inside of this function. Use the data in the parameters to calculate the final bill. You should calculate the tip amount after applying the tax to the bill amount. Assume the percentages are decimal numbers. For example, a tip percentage of 20% will be passed in as the value .2. biliAuount, double taxkct double tinRct) Input Data File Format BilAmut IAmount Sample Input Data File (notice there is no descriptive text, just the data) 100 08751 Record 200 875 1 Record 158 1 Record 15 Sample Output File (1 record per line in report) 180.0e 280.0e 150.00 Bill Taxes Tipect final Bill 130.5e 236.50 186.30 8.887 8.875 8.880 9.2e 0.1e 0.15

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago