Access over 20 million homework & study documents

Javaprograms

Content type
User Generated
Subject
Computer Science
Type
Homework
Rating
Showing Page:
1/11

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/11

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/11

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 11 pages?
Access Now
Unformatted Attachment Preview
ELI CSC 201 Unit 2 Programming Problems Worksheet Programming Problem 1 – Girl Scout Cookie Sales A troop of Girl Scouts is selling boxes of cookies. The leader of the Girl Scout troop wants to know how many girl scouts sold boxes of cookies in the following ranges: a. b. c. d. e. 0 to 10 boxes 11 to 20 boxes 21 to 30 boxes 31 to 40 boxes 41 or more boxes The program should use an array of counters to keep track of the number of Girl Scouts selling boxes of cookies in each of these ranges. The number of boxes sold for each Girl Scout will be entered at the keyboard. The total number of girls in the troop selling cookies will also be entered at the keyboard. After the total boxes for each girl in the troop has been entered, the resulting statistics for the number of boxes should be printed out to the console in the following format: TOTAL BOXES 0 to 10 11 to 20 21 to 30 31 to 40 41 or more NUMBER OF GIRL SCOUTS 13 8 5 1 1 Note that these values are just for formatting purposes. Your program needs to work for any number of girls in the troop and any number of boxes of cookies sold. Directions: • • • Create a main method that will solve the previous problem statement. You may only use statements that are discussed in the book through Chapter 6. Use the following input values for the final test of this program: • • • • • • • Total number of girls in the troop 8 Boxes of cookies for girl #1 43 Boxes of cookies for girl #2 18 Boxes of cookies for girl # ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents