subject

Java code The purpose of this assignment is to create and use a one dimensional array in a programming problem.
Problem Statement
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. 0 to 10 boxes
b. 11 to 20 boxes
c. 21 to 30 boxes
d. 31 to 40 boxes
e. 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 NUMBER OF GIRL SCOUTS
0 to 10 13
11 to 20 8
21 to 30 5
31 to 40 1
41 or more 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.
You must not use any Array class or Array method included in the Java libraries to solve this problem.
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 #3 23
Boxes of cookies for girl #4 20
Boxes of cookies for girl #5 35
Boxes of cookies for girl #6 17
Boxes of cookies for girl #7 11
Boxes of cookies for girl #8 25
Pease make sure that the code is not copleted. I need it for an intro to computer science class.
please upload the a screen shot of the output as well.
Thanks in advance

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the original authority for copyright laws
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
You know the right answer?
Java code The purpose of this assignment is to create and use a one dimensional array in a programm...
Questions
question
Mathematics, 14.06.2021 01:00
Questions on the website: 13722361