java program part 2

Dec 16th, 2014
FratBro23
Category:
Programming
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 array.java.


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Cornell University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
ddg82
Dec 9th, 2016
" Thanks, good work "
tinytim47
Nov 25th, 2016
" Wow this is really good.... didn't expect it. Sweet!!!! "
kenmwao2
Nov 24th, 2016
" Solid work, thanks. "
jestin7
Nov 16th, 2016
" This tutor is great! "
lilmoe415
Nov 3rd, 2016
" Thank you, Thank you, for top quality work, this is your guy!! "
dontuwannaknow
Oct 11th, 2016
" Excellent work as always thanks so much "
thargrow
Oct 2nd, 2016
" Very Satisfied. "
SjSurvivor143
Sep 28th, 2016
" Thanks for the help. "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1821 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