Having a difficult time writing this code up. ( JAVA based ) Will Copy and paste...

50.1K

Verified Solution

Question

Programming

Having a difficult time writing this code up. ( JAVA based )Will Copy and paste the whole solution I was left with. Thank youin advance !

Lab 5 – Class Statistics

Write a program which will uses the fileLab5Data.txt containing student names and thepoints they had earned at the end of the class. The program shoulduse one or more arrays to create a report with the followinginformation:

-A table containing the student name, total points they earnedand the letter grade that would be given.

-The student with the highest score and the average pointsearned and average letter grade given

You may use single single dimension arrays, multi-dimensionarrays or both.

Capture screen output of your report and save asGradeReport.txt

(Optionally, you may add code to create this file usingjava; see note below)

Name your program Grade.java. Upload filesGrade.java, and GradeReport.txtto Canvas.

Note: the data files mentioned downloaded from the Canvas filesarea.

Refer to the files TipsForLab5.pdf, ReadData.txt,WriteData.txt for additional information that may beusefull in completing this lab.

Answer & Explanation Solved by verified expert
4.1 Ratings (697 Votes)
The requiredcode is given below in case of any doubts you can ask me incomments and please do upvoteMainjavaimport javaioFileimport javaioFileNotFoundExceptionimport javautilScannerpublic class Main public static void mainString args throws FileNotFoundExceptionScanner read new Scannernew FileGradestxtint numberOfStudents 0while readhasNextLine numberOfStudents 1readnextLinereadcloseGrade students new GradenumberOfStudentsread new Scannernew FileGradestxtfor int i 0 i studentslength i String line readnextLineif line null lineisEmpty continueString    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students