Question 1: Write a robust Java program to create <>. This file consists of names of the students, 2 grade
-
- Posts: 43759
- Joined: Sat Aug 07, 2021 7:38 am
Question 1: Write a robust Java program to create <>. This file consists of names of the students, 2 grade
Question 1: Write a robust Java program to create <<students.txt>>. This file consists of names of the students, 2 grades of that student and final grade. Implement a GUI Form. Get the number of students from the user using comboBox and according to this number, fill the file. Number of students does not start with 0. While filling the file, for each student, you need to get the name from the JList, generate a random number for the grades which must be between 0 and 100, and according to the formula calculate the final grade of that student. To calculate the final grade of a student, please use the following formula: finalGrade = (grade1 + grade2) (total number of vowels of that student's name) #For example, name: Simge, grade1: 30, grade2: 70- finalGrade: (30+70)*2 → 200 You can see the sample of <<friends.txt>> file: --Sample file format-(Please do not write these data on your file, you need to create a file) Simge -30-70-200 Elif-50-60-220 Ali 80-80-320 Mert 100-50-150 Then, read this file(<<students.txt>>) line by line and store it into ArrayList or array. Finally display the student who has the min. final grade in the array (YOU SHOULD DEFINE A RECURSIVE FUNCTION TO FIND MAX. VALUE) (According to the sample file, the program must display Mert as an output.) We can not easily make your program crash. THERE SHOULD BE NO BUGS IN THE CODE YOU WROTE Your program should be very robust. You should handled all exceptions. You can use any interface for your Button Action. You can use any Layout to obtain GUI design.