Just C.

asked • 11/26/21

In Java: File reading and Arrays

  1. Assume there are at most 50 students’ records in each class but could be less, set your arrays size to 50.- You need multiple arrays, but not all the students’ data needs to be stored in arrays.
  2. Develop any additional methods to process a list of students as necessary (Such as read, print, process).
  3. Required Operations are:
  4. Read data from a file and store them in the arrays
  5. Print course content to a file (refer to sample output below)
  6. Search the list of students for a student and print name, average and grade of the student to the monitor (prompt user for the name of the student, assume all names are unique, if not found print error message)
  7. Add a new student to the list and print a message that student is added to the list. (Prompt user for data for the new student, don’t add duplicates, check name to make sure they are not on the list already, print error message if already on the list)
  8. Delete a student from the list and print a message that student is removed from the list. (Prompt user for the last name of the student, print error message if not found.)
  9. Print course content to the monitor (refer to sample below)

Requirements:

  1. Program must be modular (all tasks must be done in methods)
  2. Must include methods to process Student or list of Students (Auxiliary/Helper methods)
  3. Main should be short and mostly made of call to methods and declaring the necessary variables. (no loops)
  4. Prompt user for all input and output file names
  5. At start of program execution, prompt user for an input file name, start the program with loading the data into the program and then do all the operations one by one.
  6. Use the provided data files to test your program, but for the testing of the program I may use any file with the same format. They are included on zyBooks.

Input data file organization:

List of students (Assume each student has 6 test scores)
Full name (last, first)
ID Score1 Score2 Score3 Score4 Score5 Score6 Quiz

Sample input file: (Assume all names and IDs in the list are unique and must stay unique.)

Adams, John
111223333 100 87 93 90 90 89 91
Smith Jr., Willy
222114444 90 73 67 77 70 80 90
Jordan, Phil
777886666 100 80 70 50 -60 90 100

Student list print format to the monitor:

Name Average Grade
Adams, John 91.5 A
Smith Jr., Will 87.0 B
Jordan, Phil -1 I

Sample output file format:

Name ID Average Grade
Adams, John 111-22-3333 91.5 A
Smith Jr., Willy 222-11-4444 87.0 B
Jordan, Phil 777-88-6666 -1 I

Class average of 2 students is: 89.25 //student with "I" are not calculated


For the cases to pass your operations in the main method have to be EXACTLY like the following:

  1. Read data from file and store them in the arrays
  2. Print course content to the monitor
  3. Print course content to a file
  4. Search for a student
  5. Add a new student to the list
  6. Remove a student from the list

When adding a new student, the data must be pick up in the following order:

  1. Name
  2. ID
  3. 6 test scores separated by whitespace
  4. quiz score


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.