java program part 2

0 comments

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:

Define a class Student to represent the student information (student names and grade). Do NOT use public instance variables.
Define and use an array of objects of class Student to store all student records read from the file.
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.

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.
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.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount! Use Discount Code “Newclient” for a 15% Discount!NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

The post java program part 2 appeared first on Nursing Writers Hub.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}