Data Structures Assignment 4
Bike-A-Thon Fundraising
So far, in class, you have worked with the following Algorithms:
- Sum - Adding an array
- Countif - Counting items in an array if they match a criteria
- SumIf - Adding if they match a criteria
You are the captain of a Bike-a-Thon team. You will use arrays to track your team members and their donations. This assignment asks you to use these and create a new one of your own for finding the Minimum.
Create a new file called Assign4Fundraising.java.
Step 0
Set up 3 parallel arrays of 10 students:
- Their names
- The amounts they raised for the Bike-a-thon.
- It takes a minimum of $100 dollars to participate
- Set it up so that each person has raised a different amount of money.
- A boolean array stating whether or not they have returned their forms
- Set half to be true and half to be false
Step 1
Print out of all three arrays using a single For Loop so that each student’s name appears with his/her dollar amount and true/false value beside it.
Step 2 - First 80%
Using separate for loops and whatever number of additional variables you need, calculate and print the following. Make sure your printouts are well labeled:
- The total amount raised by your team. (20%)
- The average amount raised per student (20%)
- Hint: You do not need a new for loop for this. The average is just the total divided by the number of items in the array (and you just found the total in part a). Use ___.length in the average calculation.
- Some students may need support with fundraising. Count number of students who raised less than than $100. (20%)
- The names of students who have not yet turned in their forms. (20%)
Step 3 - Final 20%
- Print the highest amount raised (10%) - You do NOT need to print the name of the person who raised the highest but if you already know how to do so, then congratulate that person in a println statement.
- To win a Golden Fan (10%), you need some big donors. - TOTAL the amount raised by only those students who have raised more than $500.