Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

student submitted image, transcription available below

 

sample_report.txt

student submitted image, transcription available below
  1. Using A Class:
  2. Create all the member variables that you would need to process your array
  3. Create a default constructor to initialize your strings member variable to "unknown" and your integers and flouts to 0
  4. 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.
  5. 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.
  6. In the footer, calculate the overall average for W1, W2, W3, and W4.   (note the values 999.99 are placeholders)
  7. Output a detailed report named "sales_report.txt."
  8. Test for the input file and display the appropriate message
  9. Use comments and algorithms before their corresponding code
  10. Your code should be easy to read (use comments)
  11. Your formatting shall match precisely the sample_report.txt file.
     
     

Employee ID, Name, Email, Week1 Sales, Week2 Sales, Week3 Sales, Week4 Sales 397, Lev B. Kennedy, nulla. Donec.non@ultrices posuere cubilia.co.uk, $95.63, $59.22, $54.10, $182.66 604, Keane C. Landry, primis@etmagnisdis.ca, $54.23, $79.15, $70.50, $72.59 597, Jameson M. Cooley, at@tristique.edu, $174.73, $68.78,$97.00,$83.07 759, Colorado I. Duke, et.ultrices@aarcuSed.net, $88.19,$52.64, $51.00, $81.04 672, Chanda L. Valentine, Nam.tempor.diam@est.org, $67.39, $81.79,$79.06, $243.18 939, Chava A. Farley, dui@velarcu.co.uk, $87.11, $151.06, $87.74, $142.91 688, Clio K. Beasley, leo@vitae.net, $70.36, $76.61, $51.03, $238.74 401, Keelie T. Holman, et@ultricies.net, $53.51, $82.86, $62.52, $127.53 471, Jacqueline Z. Fulton, nibh. Donec@interdumlibero.com, $82.92, $74.58,$55.53, $84.14 903, Andrew C. Lawson, Duis.elementum@mollis Phasellus.org, $155.11, $63.50, $94.03, $132.24 503, Petra N. Chandler, dui.quis.accumsan@duiin.edu, $78.28, $70.46, $99.68, $81.92 266, Ciaran N. Langley, posuere.cubilia@mieleifendegestas.edu, $74.55, $84.19,$94.48, $128.46 790, Brooke D. Bennett, ornare.egestas@infaucibusorci.edu, $96.59, $52.24, $86.31, $239.56 185, Harriet Q. Pitts, aliquam@loremDonecelementum.org, $55.83, $83.62, $79.12, $187.45 326, Grace A. Valencia, Aenean.euismod@tempusscelerisque lorem.com, $83.87, $82.51, $62.82, $112.05 877, Kenyon E. Dickson, Donec. est.Nunc@intempuseu.edu, $99.28, $55.27, $76.85,$97.12 875, Wynne Q. Larson, ac.tellus@ornaresagittis.ca, $55.83, $55.73, $63.76, $223.46 584, Mackenzie H. Garner, aliquam.eros.turpis@eutelluseu.co.uk, $50.71, $73.40, $61.92, $248.29 821, Stacy K. Salinas, sociis@nonmassanon.com, $98.01,$93.23, $88.07, $186.98 797, Hayley V. Stuart, Ut@pedeCumsociis.co.uk, $87.01, $157.95, $99.44, $107.03 695, Cherokee X. Huffman, erat.neque@etrutrum.com, $61.01, $84.03, $77.87, $143.20 472,Amethyst D. Blake,ac.fermentum@quamafelis.co.uk, 237, Gary Y. Randall, at. auctor.ullamcorper@acmetus.edu, 506, Wynne T. Vasquez, arcu. Aliquam@semutcursus.com, $87.50,$90.35, $191.59, $87.09 264, Yoshio J. Levine,Nunc.ut@semper.com, $51.17, $87.82, $89.21, $140.89 $85.84, $82.86, $51.96, $194.31 $68.07,$87.36,$56.74,$247.64 901, Uta B. Mcintyre, risus. In@aliquetlobortis nisi.com, $51.58, $86.02, $81.11, $138.37 322, Tanner X. Prince, bibendum@Mauris quisturpis.com, $94.20,$57.22, $68.21, $164.63 123, Cailin M. Shepherd, sem.magna@sagittis.com, $81.15, $59.77, $159.15, $160.46 543, Gregory V. Clayton, ut@diamloremauctor.org, $54.35, $90.50, $82.44, $236.43 752, Wylie H. Rollins, posuere.cubilia@semper tellusid.com,$94.19,$98.26, $98.48, $146.00 972, Meghan W. Combs, Cras.dictum.ultricies@mieleifendegestas.edu, $96.96, $52.71, $62.09, $224.58 218, Kennedy K. Andrews,ultricies.dignissim@etnetus.ca, $99.65, $60.97,$71.96, $222.33 441, Cody Q. Morrison, enim.Mauris@Sedcongue.com, $61.08, $64.47,$98.66, $194.38 189, Benjamin X. Buckner, sapien. Cras@lacusQuisque.com, $58.28, $72.64, $51.49, $142.72 803, Keelie N. Dennis, egestas@mattisCraseget.net, $90.87, $79.25, $156.11, $106.07 625, Zorita D. Meyers, vel.lectus. Cum@metussit.com, $63.42, $76.81, $60.60, $207.82 545,Stewart Z. Rowland, semper. cursus. Integer@massaQuisque.com, $71.98, $52.68, $77.36, $154.20 307, Aladdin A. Foster, nec. imperdiet@bibendumsedest.net, $74.99, $72.84, $82.39, $113.55 265, Barry Z. Glass, nec. leo@vitae.org, $56.80, $74.73, $52.05, $249.42 526, Abbot N. Humphrey, metus@eget.org, $79.44, $92.65, $77.56, $70.54 174, Justina N. Wong, Nulla.semper@imperdieteratnonummy.org, $67.33, $93.52, $98.67, $102.62 151, Marvin W. Pittman, pretium@variuset.edu, $65.52, $71.46, $60.82, $114.63 687, Adena X. Richardson, Proin.vel.nisl@velit.edu, $50.47, $192.72, $82.83, $151.54 164, Briar P. Merritt, vel@cursus.ca, $97.54, $86.10, $87.72, $161.33 684, Adele X. Goodman, auctor.quis.tristique@purusmauris.org, $62.57, $65.44, $61.76, $218.01 495, Zeus E. Mccullough, non.leo@Donec.org, $260.82, $70.42, $77.08, $211.48

Step by Step Solution

3.42 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

Im sorry but as an AI language model I am not able to execute code or create programs However I can guide you through what a program would generally look like in a language like Python to solve the ta... 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

Introductory Statistics

Authors: Prem S. Mann

8th Edition

9781118473986, 470904100, 1118473981, 978-0470904107

More Books

Students also viewed these Programming questions

Question

Explain the meaning of the union of two events. Give one example.

Answered: 1 week ago

Question

Create a dotplot for the following data set. 2 1 3 1 0 2 1 0 2 2

Answered: 1 week ago