Skip Top Navigation Bar

Donation Drive

Write a program that tracks a school's holiday donations by classroom. There are 15 classrooms participating in the donation drive. Each classroom is numbered 1 to 15.

Logging Donations

Use a for loop to prompt each classroom for their donations. Keep track of the following:

Provide Classroom Recognition

After each classroom donation, report their recognition level based on the following:

Final Report

Once all classroom donations have been collected, report the following:

Determine Test Cases

Develop test cases to represent each classroom's donations. Include different donation amounts to report the different levels of recognition.

Edge Cases

When testing, you will want to provide values that all the situations, including the different classroom recognitions, whether or not the school met their goal, average number of items that naturally round up or down, and if two classrooms have the highest number of donations.

Algorithm

Write your algorithm for this program. Include the input, output,and conditions that will be needed. Will you need a loop? Will you need any if statements?

Trace Your Algorithm

Use your test data to trace through your algorithms and make necessary adjustments.

Write Your Program in an IDE

Now that you have planned out your program, it's time to write it in your IDE. Since this program requires input values, use of the Java Playground is not an option.

Create a DonationCenter.java file for your main program file. Add your algorithm to the body of the main method in the starter code provided.