subject

You will need to create your own implementation of the Student class. It will look much like the Student class we saw in the class PowerPoint slides. You may take some shortcuts though. Knowing that the data will always be sets of four lines of text which contain a student name and three scores, you can get away with a constructor that takes the name and three scores and creates the instance of the Student object. (You will still need to get the data out of it though, so don’t forget those methods.) Also, given that you will be reading the number of students in the “class group” as the first item of data read from the file, you can allocate the array to hold the students in the program. After that you can read the data in groups of four lines, to get the complete set of data for each student, and create a new memory space for that data in your array. Description

Here is a sample interaction between a user and the program you will write in the exercise. (User input is in bold.)

Enter file name: c:\\info. txt

Name Score1 Score2 Score3 Total

Andy Borders 200 250 400 850
John Smith 120 220 330 670
John Borell 250 250 500 1000
Robert Fennel 200 150 350 700
Craig Fenner 230 220 480 930
Bill Johnson 120 150 220 490
Brent Garland 220 240 350 810

The total number of student in this class is: 7
The average total score of the class is: 778
John Borell got the maximum score of: 1000
Bill Johnson got the minimum score of: 490


Note that the filename supplied includes the full path. Specify a full path or the IDE will not find the file.

The program performs the following actions:

1. Ask the user for the name of a file containing information about student scores and input the file name. (See “Input file format” for a description of the format of the file.)
2. Input the student information from the file and store in an appropriate array of Student objects. See “Setup” for a description of this.
3. Output a well-formatted table containing the name, individual scores and total score for each student.
4. Output the number of students in the class, the average total score, the maximum total score and the minimum total score in the class, including the names of the students with the maximum and minimum scores.

To tabulate the output, you can count spaces or use tab characters. A tab character can be printed by using the ’\t’ escape sequence. For example, System. out. print(”1\t2\t3”) will output something like “1 2 3” where 1, 2 and 3 are separated by tabs.

Input file format

The input file will contain information about student scores in the following format:



The first line, , contains the number of students in the input file, is a string representing a student name, and , and are integers (which you will read as Strings and convert to numbers) representing the three student scores. See info. txt for a sample input file in this format. Note that your solution must work with an input file following this format, but with an arbitrary number of student records—make sure your program is not hard-coded to read in 7 students.

If you look at this file on a PC, it may look like one single, long line. Don't worry about that. There are non-printing (invisible on the display) characters in the file that Java will use to tell one line from another.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:20
Usually, when we sniff packets, we are only interested certain types of packets. we can do that by setting filters in sniffing. scapy’s filter use the bpf (berkeley packet filter) syntax; you can find the bpf manual from the internet. set the following filters and demonstrate your sniffer program again (each filter should be set separately): (a) capture only the icmp packet. (b) capture any tcp packet that comes from a particular ip and with a destination port number 23. (c) capture packets comes from or to go to a particular subnet. you can pick any subnet, such as 128.230.0.0/16; you should not pick the subnet that your vm is attached to.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
You know the right answer?
You will need to create your own implementation of the Student class. It will look much like the Stu...
Questions
question
Mathematics, 03.02.2020 09:57
question
Mathematics, 03.02.2020 09:57
question
Mathematics, 03.02.2020 09:58
question
History, 03.02.2020 09:58
Questions on the website: 13722361