Suppose that the grading of x University courses is as follows: • Each student can get grades between 0 and 100. • If the student's grade is less than 40, the student is informed that the course failed (Unsuccessful). • If the student's grade is higher than 40, o The difference between the student's current grade and the number that is a multiple of 5 higher than the closest to his / her grade is less than 3. If it is lower, the student's grade is equal to the 5 fold higher than the closest one. o If the difference is 3 or more than 3, no change is made in the grade of the student. In this context, th
Suppose that the grading of x University courses is as follows:
• Each student can get grades between 0 and 100.
• If the student's grade is less than 40, the student is informed that the course failed (Unsuccessful).
• If the student's grade is higher than 40,
o The difference between the student's current grade and the number that is a multiple of 5 higher than the closest to his / her grade is less than 3.
If it is lower, the student's grade is equal to the 5 fold higher than the closest one.
o If the difference is 3 or more than 3, no change is made in the grade of the student.
In this context, the updated grades of the students are calculated according to the entered student grades
Write the Java code showing.
ü Define the section to be calculated as Java object ("Question1").
ü Question1; Take the note string as input.
public Question1 (int [] input)
ü Print out the updated notes as a series after the calculation is made
o public int [] gradingStudents ()
Code sample:
public class Question1 {
public Question1 (int [] input) {
}
// Complete the gradingStudents function below.
public int [] gradingStudents () (
}
Step by step
Solved in 2 steps with 4 images