0% found this document useful (0 votes)
9 views1 page

ASSIGNMENT2

Uploaded by

cpmac123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

ASSIGNMENT2

Uploaded by

cpmac123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Create a simple program in Java that calculates the average grade of students and stores the data

in a file. The program should provide the following functionalities:


1. Add Student Grades
a. Prompt the user to enter the name of the student.
b. Prompt the user to enter three grades (integer values) for the student.
c. Store the student name and grades in a file for future reference. Each student's
information should be stored on a new line.
2. Calculate Average Grade
a. Read the data from the file and calculate the average grade for each student.
b. Display the student name and their corresponding average grade.
3. Search for a Student
a. Prompt the user to enter the name of a student to search for.
b. If the student is found in the file, display their name and average grade.
c. If the student is not found, show an appropriate message.
4. Exit the Program:
a. Provide an option to exit the program gracefully.

You might also like