Question
Your program should have the following features: Be made with Java using Apache NetBeans JDK-please and thank you You will create a function/method which will
Your program should have the following features: Be made with Java using Apache NetBeans JDK-please and thank you
You will create a function/method which will calculate the grade of a student. The entries of the marks for each subject should be done here and the grade should be calculated here for a student.
You need to make sure that the marks entered should not be negative and greater than 100. If the marks entered is negative or greater than 100, you would ask the user to reenter the marks for that subject.
You need to make use of a loop to loop thru all the five subjects for making entry for the marks. If the marks entered is negative or greater than 100, you would ask the user to reenter the marks for that subject.
In the main method, you should be using an input from the user whether he wants to enter the marks for more student or not. If answer is Y, you should let him enter the marks for the next student. If the answer is N, your program should terminate. Here again, you will make use of loop to go thru the students.
The main method should not have any code to calculate the grade. It should be done in the function created and that functions should be called in a loop here.
The output should be something like this.
This program calculates the grades for the students
It accepts the marks for the five subjects and then based on the marks entered by the user, it calculates the percentage and the grade for that student.
. It will run for at least one time and then based on input from the user whether user wants to continue or not, the program either terminates or continues
Grades for student: 1
Please enter the marks for 1 subject(it should be between 0 and 100):
100
Please enter the marks for 2 subject(it should be between 0 and 100):
78
Please enter the marks for 3 subject(it should be between 0 and 100):90
Please enter the marks for 4 subject(it should be between 0 and 100):56
Please enter the marks for 5 subject(it should be between 0 and 100):
45
Total Marks:369.0
Percentage is:73.799995
Grade is: C
Need to enter marks for more student? enter Y or N:Y
Grades for student: 2
Please enter the marks for 1 subject(it should be between 0 and 100):
55
Please enter the marks for 2 subject(it should be between 0 and 100):66
Please enter the marks for 3 subject(it should be between 0 and 100):
99
Please enter the marks for 4 subject(it should be between 0 and 100):
99
Please enter the marks for 5 subject(it should be between 0 and 100):
100
Total Marks:419.0
Percentage is:83.8
Grade is: B
Need to enter marks for more student? enter Y or N:N
Terminating the program
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