Question: A school has five classes (called Class 1, Class 2 etc) and they are selling boxes of cookies for a fundraiser. Your program accepts input

A school has five classes (called Class 1, Class 2 etc) and they are selling boxes of cookies for a fundraiser. Your program accepts input (class number followed by number of boxes sold)...there are ten lines of input. Method getInput will collect this input and load and return an array of length 5, so that the total number of boxes sold by Class 1 is in the first element, the total for Class 2 is in element 1 etc. Method printOutput then outputs the result.

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