Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write java program by netBeans program that finds all students who score the highest and lowest average marks of the first two homework in CS
Write java program by netBeans program that finds all students who score the highest and lowest average marks of the first two homework in CS (I). 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 Aisha Al-Rabani 70 78 Ruqaya Al-Moqbali 70 88 Karima Al-Rawas 63 90 Manal Al-Siyabi 88 78 Khalsa Al-Sariri 68 89 Iman Al-Zadjali 55 99 Farha Al-Waheibi 80 87 Amel Muqabal 71 80 Munira Alabri 70 88 Amel Khamis 91 83 Huda Al-Mukheini 83 83 Nawal Al-Shikeili 75 89 Rasha Al-Raidan 90 68 Saif Al-Hashmi 72 66 Mohamed Al-Kharousi 96.5 71.5 Mohammed Al-Badi 99 75 Ibrahim Al-Mamari 85 65 Ishaq Al-malki 99 90 Then your output should look like: Student Name Mark1 Mark2 Avg. Mark Grade -------------------------------------------------------------------------------------------------------------------- Ali Al-Shikeli 80.00 81.00 81.50 B Noorai Al-Wardi 60.00 70.00 65.00 D Aisha Al-Rabani 70.00 78.00 74.00 C --------------------- ------ ------ ------ -- --------------------- ------ ------ ------ -- Ishaq Al-malki 99.00 90.00 94.50 A The Maximum average mark is: ........ Scored by: ........ ................. The minimum average mark is: ........ Scored by: ......... ................. The average of the class: ........... The Grade of the class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started