Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

invoice 1 LastName FirstName DaysofRental BalanceDue Smith Joe 15 100.50 Doe John 10 95.20 Anderson Paul 30 20.00 O'Donell Miriam 10 24.30 Foster Sam 30

invoice 1

LastName FirstName DaysofRental BalanceDue Smith Joe 15 100.50 Doe John 10 95.20 Anderson Paul 30 20.00 O'Donell Miriam 10 24.30 Foster Sam 30 15.00 Zom Pete 10 20.00 Mock Chilly 100 30 smitty Chris 200 200 xu Conor 1 200 anilo steve 0 0

invoice 2

LastName FirstName DaysofRental BalanceDue Pulisic Christian 155 100.50 Dempsey Clint 50 195.20 Howard Tim 2 1.00 Yedelin DeAndre 1000 5000.30 Gonzales Omar 50000 20000.00 Zusi Graham 10 20.00 Wood Bobby -2 -900 Bradley Michael 68 2000 Green Julian 1 2 Beasley Demarcus 2 1.00

1.using fstream object to read and write to files. Grade: 0

2 using an array to store records: Grade: 0

3. Indentation and Style Rules

4. making use of iomanip - formatting text and floating point numbers:

Two test files are included for you to run your program with. Please create 2 additional test files, and show me the output for those as well.

Submit your .cpp file source code, 4 output files, and your two additional test files you ran your program with.

Need to use IO Manipulators for formatting output

image text in transcribed

amming Ass we have a text file, pastdue.txt( attached), that contains data for pa?d ue invoices. The input file resembles the following: LastName FirstName DaysofRental BalanceDue Smith Joe 15 100.50 Doe John 10 95.20 Anderson Paul 30 20.00 O'Donell Miriam 10 24.30 Foster Sam 30 15.00 Preconditions: File always has 10 records. The specification is as follows: . Sort the input file by last name, and create a new sorted file called "sorted.txt . In the new file you created in 1., also include the following information: Total balance due, which would be the sum of all records . Customer with the highest number of rental days. . Customer with the highest balance due. The output file should look as follows: LastName FirstName DaysofRental BalanceDue Anderson Paul 30 20.00 Doe John 10 95.20 Foster Sam 30 15.00 O'Donell Miriam 10 24.30 Smith Joe 15 100.50 Total Balance Due for file: 255.00 Customer with the highest number of rental days are Paul Anderson, Sam Foster Customer with the highest balance due are: Joe Smith All programs need to be submitted to moodle. Only submit your cpp file Grading Gradesarecalculated based on efficiency, correctness and style. Any programthat is submitted and doesnotcompile willreceive an automatic F, no questions asked, and absolutely no resubmissions

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

Step: 3

blur-text-image

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

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago