A group of Girl Scouts sold cookies for a four-week period. The data file (gsdata.txt) contains the
Fantastic news! We've Found the answer you've been seeking!
Question:
A group of Girl Scouts sold cookies for a four-week period. The data file (gsdata.txt) contains the sales records for each scout. Create a program that uses the data located in gsdata.txt to return a sales report (sample_report.txt) as follows:
gsdata.txt
sample_report.txt
- Using A Class:
- Create all the member variables that you would need to process your array
- Create a default constructor to initialize your strings member variable to "unknown" and your integers and flouts to 0
- Create the function output() that displays the header, detail, and footer - modify.
- In the detail section, display the name, employee number, and amount sold for the four weeks.
- Create the member function highest() that returns the column number of the highest value from W1 thru W4 for each scout (W1 = 1, W2 = 2,...)
- Calculate the total 4-week sales of each Girl Scout.
- In the Note column, display "***Prize***" for any girls scout with a total sales equal or greater than $450.00.
- Create a Menu (displays on screen) that allows the user to sort by Name or Employee ID (using a switch)
- Create the function sortName() to sort the detail section by name(ascending) - modify.
- In the footer, calculate the overall average for W1, W2, W3, and W4. (note the values 999.99 are placeholders)
- Output a detailed report named "sales_report.txt."
- Test for the input file and display the appropriate message
- Use comments and algorithms before their corresponding code
- Your code should be easy to read (use comments)
- Your formatting shall match precisely the sample_report.txt file.
Related Book For
Posted Date: