Write this as Java code Exercise #3: Write a program that finds all students who score the highest and lowest average marks of the first two homework in CS (). Your program should read the data from a file called "hw2.dat" and displays number of students,N. The next N lines contain information about the students. Each data line contains student name and his her marks. The output should display all student names, marks, and grades. In addition, the output to another file called "hw2.out" and on the screen. The first line of the input file contains the you should output the highest and lowest marks and those who eamed them along with the average and the grade of the class. If your input file contains: 20 Ali Al-Shikeli 80 81 Noora Al-Wardi 60 70 70 78 Aisha Al-Rabant Rugaya Al-Moqbali Karima Al-Ranwas Manal Al-Siyabi Khalsa Al-Sariri Iman Al-Zadjali Farha Al-Wahelbi Amel Mugabal 70 88 90 63 88 78 68 89 35 99 80 87 71 80 Munira Alabri 70 88 Amel Khamis Huda Al-Mukheini 91 83 83 83 Nawal Al-Shikeili Rasha Al-Raidan 75 89 90 72 68 66 Saif Al-Hashmi Mohamed Al-Kharoust Mohammed Al-Badi 96.5 99 71.5 75 Ibrahim Al-MMamari 85 65 Ishaq Al-malki 99 90 Then your output should look like: Student Name Marki Mark2 Avg. Mark Grade Ali Al-Shiteli Noorai Al-Wardi 80.00 81.00 70.00 81.50 ఈ00 60.00 Aisha Al-Rabani 70.00 78.00 74.00 Ishaq Al-malki 99.00 90.00 94.50 The Maximum average mark is: The minimum average mark is: Scored by: Scored by: The average of the class: The Grade of the class:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Write this as Java code
Exercise #3: Write a program that finds all students who score the highest and lowest average marks of the
first two homework in CS (). Your program should read the data from a file called "hw2.dat" and displays
the output to another file called "hw2.out" and on the screen. The first line of the input file contains the
number of students, N. The next N lines contain information about the students. Each data line contains
student name and his/her marks. The output should display all student names, marks, and grades. In addition,
you should output the highest and lowest marks and those who earned them along with the average and the
grade of the class.
If your input file contains:
20
Ali Al-Shikeli
80
81
Noora Al-Wardi
60
70
70
78
Aisha Al-Rabani
Rugaya Al-Moqbali
Karima Al-Rawas
Manal Al-Siyabi
70
88
90
63
88
78
Khalsa Al-Sariri
68
89
Iman Al-Zadjali
Farha Al-Waheibi
Amel Mugabal
35
99
80
87
71
80
Munira Alabri
70
88
Amel Khamis
Huda Al-Mukheini
91
83
83
83
Nawal Al-Shikeili
Rasha Al-Raidan
75
89
90
72
68
66
Saif Al-Hashmi
Mohamed Al-Kharoust
96.5
99
71.5
75
Mohammed Al-Badi
Ibrahim Al-Mamari
85
65
Ishaq Al-malki
99
90
Then your output should look like:
Student Name
Markl
Mark2
Avg. Mark
Grade
Ali Al-Shikeli
Noorai Al-Wardi
80.00
60.00
81.00
70.00
81.50
65.00
D
Aisha Al-Rabant
70.00
78.00
74.00
C
---
Ishaq Al-malki
99.00
90.00
94.50
The Maximun average mark is:
The minimum average mark is:
Scored by:
Scored by:
....... N
The average of the class:
The Grade of the class:
Transcribed Image Text:Write this as Java code Exercise #3: Write a program that finds all students who score the highest and lowest average marks of the first two homework in CS (). Your program should read the data from a file called "hw2.dat" and displays the output to another file called "hw2.out" and on the screen. The first line of the input file contains the number of students, N. The next N lines contain information about the students. Each data line contains student name and his/her marks. The output should display all student names, marks, and grades. In addition, you should output the highest and lowest marks and those who earned them along with the average and the grade of the class. If your input file contains: 20 Ali Al-Shikeli 80 81 Noora Al-Wardi 60 70 70 78 Aisha Al-Rabani Rugaya Al-Moqbali Karima Al-Rawas Manal Al-Siyabi 70 88 90 63 88 78 Khalsa Al-Sariri 68 89 Iman Al-Zadjali Farha Al-Waheibi Amel Mugabal 35 99 80 87 71 80 Munira Alabri 70 88 Amel Khamis Huda Al-Mukheini 91 83 83 83 Nawal Al-Shikeili Rasha Al-Raidan 75 89 90 72 68 66 Saif Al-Hashmi Mohamed Al-Kharoust 96.5 99 71.5 75 Mohammed Al-Badi Ibrahim Al-Mamari 85 65 Ishaq Al-malki 99 90 Then your output should look like: Student Name Markl Mark2 Avg. Mark Grade Ali Al-Shikeli Noorai Al-Wardi 80.00 60.00 81.00 70.00 81.50 65.00 D Aisha Al-Rabant 70.00 78.00 74.00 C --- Ishaq Al-malki 99.00 90.00 94.50 The Maximun average mark is: The minimum average mark is: Scored by: Scored by: ....... N The average of the class: The Grade of the class:
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY