The fileiohelper class provides 2 class methods

Assignment Help JAVA Programming
Reference no: EM13942177

Program reads info about students and their scores from a file and output the name of each student w/all his/her scores and the total score, plus the average score of the class, and the name and total score of the students with the highest and lowest total score.
4 files are provided:
SavitchIn.java - contains simple input library
FileIOHelper.class - contains a class for simple file input
Sutdent.class - class for student records
info.txt - sample input file
Program performs following actions: 1.Ask the user to enter the name of a file containing information about student scores and input the file name 2.Input the student info from the file and store it in an appropriate array of Student objects 3.Output in a well formatted table the name, individual scores, and total score for each student 4.Output the number of students in the class, the average total score, and the maximum and minimum total score in the class
The input file will contain info about student scores in the following format:
<number of students>
<student name>
<score 1>
<score 2>
<score 3>
<student name> . . .
The first line <number of students> must contain the number of students in the input file, <student name> is a string representing a student name, and <score 1>, <score 2>, <score 3> are integers representing the 3 student scores. Solution must work with an input file following this format but with an arbitrary number of student records.

Sample interaction b/t a user and the program:

Enter file name: info.txt

Name Score1 Score2 Score3 Total
------------------------------------------
Andy Smith 200 250 400 850
Jake Wise 120 220 330 670
------------------------------------------
The total number of students in this class is: 2
The average total score of the class is: 760
Andy Smith got the maximum total score of: 850
Jake Wise got the minimum total score of: 670
-------------------------------------------

The FileIOHelper class provides 2 class methods:

1.int FileIOHelper.getNumberofStudents(String fileName): takes a String parameter which is the name of an input file in the format described above, and returns the number of students in the file

2.Student FileIOHelper.getNextStudent(): takes no parameters, inputs the name and scores for the next student in the input file, and returns a Student object w/the corresponding value.

A Student object has a name (String) and 3 scores (integers). The Student class provides the following (instance) methods to manipulate Student objects:

1.Student(String name), a constructor: takes a String parameter, the name, and creates a Student object w/the given name and 0 for all the scores

2.String std.getName(): returns the name of student std

3.int std.getScore1(): returns the first score for student std

4.int std.getScore2(): returns the second score for student std [continued for 3rd score]

5.void std.setScore1(int score): takes an integer score, and sets the first score for student std

6.void std.setScore2(int score): takes and integer score and sets the 2nd score for student.std [continues for 3rd]

Attachment:- Desktop.zip

Reference no: EM13942177

Questions Cloud

How do you maintain the balance among web resources : How do you maintain the balance between writing your own thoughts and quoting or paraphrasing from your sources? What percentage of your paper is original?
Derive differential equation for predicting capsule : Derive a differential equation for predicting the capsule temperature as a function of time. Solve this equation to obtain the temperature as a function of time in terms of capsule parameters and its initial temperature Ti.
Economic conditions remain healthy : An investment is expected to yield a return of 14% if economic conditions remain healthy, or improve. If a downturn occurs the expected return is just 4%.
What is traditional utilitarianism : What is traditional utilitarianism? With traditional utilitarianism, how do you determine what the moral thing to do on any particular occasion might be
The fileiohelper class provides 2 class methods : 1.int FileIOHelper.getNumberofStudents(String fileName): takes a String parameter which is the name of an input file in the format described above, and returns the number of students in the file
Importance of the engagement : the importance of the engagement files for engagement continuity
How does the audience influence structure, tone, word choice : How does the audience influence the structure, tone, word choice, and content of an essay? Consider the audience in a classroom setting. What assumptions might you make regarding your audience?
A mass produced shoe manufacture : Due to financial hardship, the Nyke shoe company feels they only need to make one size of shoes, regardless of gender or height. They have collected data on gender, shoe size, and height and have asked you to tell them if they can change their bus..
Calculate the price elasticity of demand : Calculate the price elasticity of demand between $9 and $10. Is demand in this range elastic or inelastic?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Wa program that takes 10 values represent

Using a loop, write a program that takes 10 values represent in exam grades (between 0 and 100) from the keyboard and outputs the minimum value, maximum value, and average value of all the values entered.

  Determine when the application should stop looping display

Write an application that reads a series of pairs of numbers as follows: 1) product number 2) quantity sold - Create an application in java

  Cse-241 advance programming conceptspoint of sale

cse-241 advance programming conceptspoint of sale terminalin this assignment you will be tested on the concepts related

  A fault is fundamentally a deviation from expected behavior

write a 200- to 300-word short-answer response to the following a fault is basically a deviation from expected

  One acre of land is equivalent to

One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of square feet in a tract of land with 3.5acres.

  What is a specific example of a javascript application

What is the purpose of using JavaScript(r) on a website? What is a specific example of a JavaScript(r) application that will be beneficial on the site you are creating

  Create java applet to input miles driven and gallons used

Create the Java applet which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display miles per gallon obtained for each tankful.

  Consider an algorithm for computing cubes using addition

You have a computer where multiplication is an enormously expensive operation compared to addition. Consider an algorithm for computing cubes using only addition (FYI: the first 5 cubes are 13 = 1, 23 = 8, 33 = 27, 43 = 64 and 53 = 125). This comp..

  Tasks for an array of integers

Write array methods that carry out the subsequent tasks for an array of integers by completing the ArrayMethods class below. Test each method.

  Calculate the maximum data rate in mb/second

b)How much cylinder skew is needed for an Oceangate disk operating at 20,000 rpm(new series for the Christmas promotions) which has a seek time of 0.5 milliseconds? This disk has 800 sectors of 512 bytes each on each track.

  Develp a simple model of an object-oriented system

you are going to develp a simple model of an object-oriented system. this model should be able to provide all the working examples of inheritance, encapsulation, and polymorphism through the use of class,. methods, and objects

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd