Question

please write a c++ file using these two invoices attached as well as 2 extra for...

please write a c++ file using these two invoices attached as well as 2 extra for the output. please do not use any libraiers other then, #include <fstream> #include <iostream> #include <string> #include<iomanip> (for styling.) Do not use void either. The program should ask for LastName FirstName DaysofRental and BalanceDue and sort it by last name then save to a file.

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.

Two test files are included for you to run your program with. These should be the inputs that get sorted and saved to a file.

test file 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

test file 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

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
please write a c++ file using these two invoices attached as well as 2 extra for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In...

    Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In this project, we combine the concepts of Recursion and Merge Sorting. Please note that the focus of this project is on Merging and don't forget the following constraint: Programming Steps: 1) Create a class called Art that implements Comparable interface. 2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file. 3)...

  • Using C programming For this project, you have been tasked to read a text file with student grade...

    Using C programming For this project, you have been tasked to read a text file with student grades and perform several operations with them. First, you must read the file, loading the student records. Each record (line) contains the student’s identification number and then four of the student’s numerical test grades. Your application should find the average of the four grades and insert them into the same array as the id number and four grades. I suggest using a 5th...

  • I need one file please (C++)(Stock Market) Write a program to help a local stock trading...

    I need one file please (C++)(Stock Market) Write a program to help a local stock trading company automate its systems. The company invests only in the stock market. At the end of each trading day, the company would like to generate and post the listing of its stocks so that investors can see how their holdings performed that day. We assume that the company invests in, say, 10 different stocks. The desired output is to produce two listings, one sorted...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT