Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Students class to Model a Student object. Allow the user to enter the first and last names and grades of the students. The

Create a Students class to Model a Student object. Allow the user to enter the first and last names and grades of the students. The user should be prompted for the name of the file to create and for the number of student grades that will be entered. After the data has been entered and the written to a file, the file should be read and information should be store in one 0r two Arrays. You must then sort the Array(s) so that students are ordered from lowest and highest grades. From the Array, all the Students are displayed first. Students with the lowest and highest grades should then be displayed along with the average score for the class. Remember, you must use Array to maintain the data that is read from the file. You may use Java.util.Arrays and associated sorting Method in the Arrays class. Please remember to use try-catch appropriately. When you are finished displaying student information, store student back into the file in grade sorted order.

Example I/O

What is the name of the file you want to create?:List.txt

// String thisfile = Scanner object.next; File myfile = new File("D:\\TestFolder\\thisFile");

How many students are in the class?: 10

Enter student full name: John Smith

Enter overall grade: 90

//Write code here for creating the object and then saving the object to file

//When you are finished adding Students to file, create an array list to store Students from file.

//Read the file and store students in the Array.

//Sort the Array according to grades for smallest to largest

Student Grade

John Smith 90%

Peter Parker 71%

............

Billy Bob 35%

_______________________________

Overall Average: 68.5%

Lowest Mark: 40%

Highest Mark: 90%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago