<p>Ahhh I can’t understand this assignment. Please Help ? </p>
<p>Write a program that reads in letter grades for a class of students and calculates the class summary statistics. </p>
<p>a. The display should be formatted EXACTLY like the sample display below:</p>
<p>Enter grade #1: C
Enter grade #2: V
<v is=“” not=“” an=“” acceptable=“” grade=“”>
Enter grade #2: F
Enter grade #3: A
. . .</v></p>
<p>Enter a grade #15: A
Enter a grade #16: Z</p>
<pre><code> 15 students total
</code></pre>
<p>12 students passed: 8O.00%
3 students failed: 20.00%</p>
<p>b. The program should read in letter grades (A-F) from the user until the user enters a Z, signifying that he/she is done. (Z is referred to as the sentinel, or stopping value.)</p>
<p>c. If the letter grade is invalid (not A-F), the program should tell the user that the grade is unacceptable and prompt the user again. </p>
<p>d. The prompt to the user (Enter grade #1: ) should tell which grade number is being entered.</p>
<p>e. When all grades are entered, the program should display the following information as shown below:</p>
<p> Total number of students
Percent of students who passed
Percent of students who failed</p>
<p>f. All percentages should have 2 digits to the right of the decimal.</p>
<p>g. The program should NEVER ask the user the total number of students.</p>
<hr>
<p>this is what I have so far. Am I even on the right track? </p>
<p>import java.util.Scanner;
public class GradeLoops {</p>
<pre><code>public static void main(String args) {
Scanner reader = new Scanner (System.in);
double pass, fail, chicken;
char value;
pass = 0.0;
fail = 0.0 ;
chicken = 0.0;
System.out.println(“Enter your students’ grades. Enter Z when you are finished.”);
int cookie = 0;
while (chicken != 29){
cookie ++;
system.out.println("Please enter student " + cookie + “'s grade:”);
value = reader.nextchar();
char A,B,C,D,F,Z;
if (value == A ||value == B ||value == C||value == D){
pass ++;
}else if (value == F){
fail ++;
}else if (value == Z){
break;
}else{
system.out.println(“That is not a valid grade.”);
}
}
}}
</code></pre>