(Solved) : Write Program Java Reads Text File Containing Students Names Followed Test Scores Program Q42784193 . . .

Write Program in Java

Reads a text file containing students’ names followed by theirtest scores. The program should output each student’s name followedby the test scores and the relevant grade. It should also find andprint the highest test score and the name of the students havingthe highest test score.

Student data should be stored in an instance ofclass variable of typestudentClass, which has four components:StudentFName,studentLName of type string,testScore of type int (testScore isbetween 0 and 100), and grade of typechar. Assume that the class has 20 students. Use an array of 20elements of type studentClass.

SPECIFIC REQUIREMENTS

Your program must contain at least the following methods:

  1. A method to read the students’ data into the array
  2. A method to assign the relevant grade to each student
  3. A method to find the highest test score
  4. A method to print the names of the students having the highesttest score.
  5. Your program must output to a text file eachstudent’s name in this form: last name followed by a comma,followed by a space, followed by the first name, the name must beleft justified; you should output each student’s name followed bythe test scores and the relevant grade. It should also find andprint the highest test score and the name of the students havingthe highest test score as follow:

Test Score Grade 85 93 Out - Notepad File Edit Format View Help Student Name Donald, Duckey Goofy, Goof Balto, Brave Smitn, S

  1. Other than declaring variables and opening the input and outputfiles, the function main() should only be a collection of functioncalls.
  2. Comment your code and use meaningful or mnemonic variablenames.
  3. You must use the “Data.txtPreview the document” fileprovided

Data.txt components inside the file:

Duckey Donald 85
Goof Goofy 89
Brave Balto 93
Snow Smitn 93
Alice Wonderful 89
Samina Akthar 85
Simba Green 95
Donald Egger 90
Brown Deer 86
Johny Jackson 95
Greg Gupta 75
Samuel Happy 80
Danny Arora 80
Sleepy June 70
Amy Cheng 83
Shelly Malik 95
Chelsea Tomek 95
Angela Clodfelter 95
Allison Nields 95
Lance Norman 88

GENERAL RESTRICTIONS

  1. No infinite loops, examples include:
    1. for(;;)
    2. while(1)
    3. while(true)
    4. do{//code}while(1);
  2. No break statements to exit loops
  3. No labels or go-to statements

The program reads the Data.txt file and displays the font below.The program must display a new out.txt file look at step 5.

program complete Press any key to continue ...,

Test Score Grade 85 93 Out – Notepad File Edit Format View Help Student Name Donald, Duckey Goofy, Goof Balto, Brave Smitn, Snow Wonderful, Alice Akthar, Samina Green, Simba Egger, Donald Deer, Brown Jackson, Johny Gupta, Greg Happy, Samuel Arora, Danny June, Sleepy Cheng, Amy Malik, Shelly Tomek, Chelsea Clodfelter, Angela Nields, Allison Norman, Lance 95 88 Highest Test Score: 95 Students having the highest test score: Green, Simba Jackson, Johny Malik, Shelly Tomek, Chelsea Clodfelter, Angela Nields, Allison We were unable to transcribe this imageprogram complete Press any key to continue …, Show transcribed image text Test Score Grade 85 93 Out – Notepad File Edit Format View Help Student Name Donald, Duckey Goofy, Goof Balto, Brave Smitn, Snow Wonderful, Alice Akthar, Samina Green, Simba Egger, Donald Deer, Brown Jackson, Johny Gupta, Greg Happy, Samuel Arora, Danny June, Sleepy Cheng, Amy Malik, Shelly Tomek, Chelsea Clodfelter, Angela Nields, Allison Norman, Lance 95 88 Highest Test Score: 95 Students having the highest test score: Green, Simba Jackson, Johny Malik, Shelly Tomek, Chelsea Clodfelter, Angela Nields, Allison

program complete Press any key to continue …,

Expert Answer


Answer to Write Program in Java Reads a text file containing students’ names followed by their test scores. The program should o…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?