Question: This is for Java 7.5_7.6.3 - Donations This program should print a list of donors names and the dollar amount each has donated sorted in
This is for Java

7.5_7.6.3 - Donations This program should print a list of donors names and the dollar amount each has donated sorted in descending (most to least) order based on the amount. The names and amounts will be stored in a file named donors.dat where each donor's name and amount is on a separate line and separated by a space. Your program must include a class name Donor that has two instance fields, name and amount. Include an appropriate constructor and the necessary accessor and mutator methods for the fields and a toString method. The main method within the Donations class should read each line of the data and construct a Donor object and place each Donor object into an ArrayList whose type is Donor. Modify either a selection or insertion sort from this lesson so that it will sort a list of donors in descending (largest to smallest) order based on the amount. There is no starter file for this programming problem. Here is a sample run: Maria 125.0 Isaac 105.75 Jane 98.5 Matsu 61.99 Susan 50.0 Carl 45.25 Tiffany 38.0 Sam 25.0 Alonzo 18.65
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
