Hi. I need to hire someone to help me with my Java homework. It's due in two days from today, Nov. 16, 2017. I'm not a great programmer and I'm stuck on a deadline for my other classes. Here is the prompt:
The purpose of this assignment is to get some practice sorting objects in an
array. The data you are sorting will consist of the approval ratings of congress
members of California over the last five months. The numbers in this data were
randomly generated; another words, it is not real data, only meant to be used for
the purposes of this assignment.
Disclaimer: You will not be allowed to use the Arrays or ArrayList classes for this
You will be creating a class for congress members, called CongressMembers.
Instance variables must be private, and will consist of the congress member’s
name, and the last five months of approval ratings. Instance methods will be
public, and will consist of all necessary “getter” and “setter” methods, as well as a
method to return the average of the congress member’s approval ratings.
In a separate class called CongressMembersTest (which will contain your main
method), you will create an array of CongressMember objects and do a few
specific things with this array. Read in data from a file called [url removed, login to view] (from
course webpage - Examples/Program4), initialize each object in the array with
the data from each line of text from the data file. Each line in the file consists of
the congress member’s first and last name, as well as five floating-point values
(the approval ratings for the last 5 months). You’ll need to read through the file
once to determine how many members of congress are in the file, in order to
initialize the array with the correct number of elements. ***Please make sure the
File object in the program you submit has a path of only the file name.
Still in CongressMembersTest, create a method called sortByFirstName that
sorts the array of CongressMembers by first name. It should both accept and
return an array of CongressMembers. You can use bubble sort.
Create another method called sortByApprovalRating that sorts the array of
CongressMembers by average approval rating. It should also both accept and
return an array of CongressMembers.
Finally, your program needs to write to a text file called [url removed, login to view] the contents of
CongressMembers array sorted by first name, and sorted by approval rating.
Write to a file using FileWriter and PrintWriter objects. The very first line of the file
should be how many congress members there are total. Separate the two sorted
lists with two blank lines, and a print statement stating which list is which. The
format of the file you write should be name and five approval months approval
rating all on the same line separated by a space.
6 freelancer đang chào giá trung bình $151 cho công việc này
Hello sir. I have good java expertise and i would like to work on your project. Feel free to contact me. Thanks Relevant Skills and Experience Java Proposed Milestones $50 USD - Project