simple java question with comments needed

Get perfect grades by consistently using our writing services. Place your order and get a quality paper today. Take advantage of our current 20% discount by using the coupon code GET20


Order a Similar Paper Order a Different Paper

Pro 5.rar – FILES NEEDED HERE

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 in the terminal window.
  • After the name and grade it also prints the type of the grade: excellent (> 89), ok [60,89], and failure (< 60).
  • Then the program prints the number of students, and their average grade and also the number of students and their average in each grade category (excellent, ok, and failure).

For example, with the input file students.txt the program must print the following:

John Smith  90 excellent
Barack Obama  95 excellent
Al Clark  80 ok
Sue Taylor  55 failure
Ann Miller  75 ok
George Bush  58 failure
John Miller  65 ok

There are 7 students with average grade 74.0
There are 2 excellent students with average grade 92.5
There are 3 ok students with average grade 73.3333
There are 2 failre students with average grade 56.5

Requirements and restrictions

  • Use the Student.java and Students.java classes from the course website to represent and process student records and modify them accordingly:
    • The encapsulation principle must be strictly enforced.
    • The main method in class Students should only read the text file, and print student records (student names, grade and grade type) and statistics (number of students and averages).No other kinds of computations should be included in the main method (e.g. checking student grade intervals and student type, counting students, totaling grades).
    • All counting, totaling, computing averagas, checking grade intervals, and assigning grade types to students should be implemented in class Student. Hints: use static variables in class Student and add methods to compute and return (or print) averages. Modify the toString() method to return the grade type too.
  • 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.

"Is this question part of your assignment? We can help"

ORDER NOW

Got stuck with another paper? We can help! Use our paper writing service to score better grades and meet your deadlines.

Get 15% discount for your first order


Order a Similar Paper Order a Different Paper
Writerbay.net