Question: Write a menu - driven C + + program that helps a recycling company keeps records on providers of waste paper products in the following

Write a menu-driven C++ program that helps a recycling company keeps records on providers of waste paper products in the following form:
ID integer
Name string
Current Year Amount Paid (CYAP) double (or float)
Amount Due double (or float)
Your program should first data from a file named paper.dat for a set of records and places these records into a binary search tree using ID as the search key, as it is unique for each provider. Each data item in the file will appear on a separate line, and the names may contain white spaces. There is a blank line between records. Your program should then display a menu with the following options:
1. Add a record
2. Issue a payment
3. Accept a delivery
4. Print Summary Report
0. Exit
Implement each option as described below:
1. ADD A RECORD - Accept the ID Number and Name of a new provider and add a new record to the list. Set the Amount Paid and Amount Due to zero.
2. ISSUE A PAYMENT - Accept an ID Number and print the Amount Due for that ID Number. Then accept from the user a payment amount, which is less than or equal to the amount due. Update Current yearly amount paid and Amount Due accordingly and print the up-to-date amount due. Print an error message if a record with that ID Number is not on the list.
3. ACCEPT A DELIVERY - Accept an ID Number and a dollar amount for the amount of paper delivered. Add this dollar amount to the Amount Due and print an up-to-date Amount Due. Print an error message if a record with that ID Number is not on the list.
4. PRINT SUMMARY REPORT - Print a report with one set of headings that shows all information on the list.
EXIT print the list of records to an output file named paper.out and terminate the program. The output file should have the same format as the input file.
Program should return to the main menu after performing each operation.
Sample I/O
Sample input and output files as well as an executable have been placed in the class folder.

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 Programming Questions!