java program part 2

Dec 16th, 2014
Price: $25 USD

Question description

Write a program in Java and run it in BlueJ according to the following specifications:

  • The program reads a text file with student records (first name, last name and grade) and prints them on the terminal window.
  • Then it prints three separate lists of excellent students, ok students and failure students according to their grades: excellent (> 89), ok [60,89], and failure (< 60).
  • Finally, the program prints the total number of students, their grade average, and the students with highest and lowest grade.
  • For example, if the input text file includes the following data:
John Smith 90
Barack Obama 95
Al Clark 80
Sue Taylor 55
Ann Miller 75
George Bush 58
John Miller 65
the program prints the following:

Students with excellent grades:
John Smith 90
Barack Obama 95

Students with ok grades:
Al Clark 80
Ann Miller 75
John Miller 65

Students with failure grades:
Sue Taylor 55
George Bush 58

Total number of students: 7
Average grade: 74.0
Student with highest grade: Barack Obama 95
Student with lowest grade: Sue Taylor 55

Requirements and restrictions:

  1. Define a class Student to represent the student information (student names and grade). Do NOT use public instance variables.
  2. Define and use an array of objects of class Student to store all student records read from the file.
  3. Define and use the following methods for:
    • Computing the average grade of all students.
    • Finding the students with highest and lowest grades.
    • Printing students in each grade category.
  4. Do NOT use the array of Students directly in the main method, all processing must be done by the methods described above using the array passed to them as a parameter.
  5. When you write your program
    • use proper names for the variables suggesting their purpose.
    • format your code accordingly using indentation and spacing.
    • use multiple line comment in the beginning of the code and write your name, e-mail address, class, and section.
    • for each line of code add a short comment to explain its meaning.

Extra credit (up to 2 points):

The extra credit will be given for extending the program to sort the array of students by grade and print the sorted array. Use the bubble sort algorithm as implemented in

Tutor Answer

(Top Tutor) Daniel C.
School: Cornell University

Studypool has helped 1,244,100 students

Review from our student for this Answer

Dec 16th, 2014
"Thanks, good work"
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1820 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors