Does it need an output statement or something? If so where do i put it?
package gradebook; import javax.swing.JOptionPane; import java.text.DecimalFormat; public class reportcard { public static void main (String[] args){ //A new school in the area has hired you to build a grade //report software for them. The school wants the software //interaction to be as follows: // Name string // Test1 double // Test2 double // Test3 double // Test4 double // Test5 double // Avg double // Avg= (Test1+Test2+Test3+Test4+Test5)/5.0; //The software should also display the letter grade based on the grade scale: // A: 90 - 100 // B: 80 - 89 // C: 70 - 79 // D: 60 - 69 // F: 0 - 59 //The program shall end if the average for the final grade is below zero (0) //or higher than 100. //Intro System.out.print("Welcome to the gradebook."); String name; double test1; double test2; double test3; double test4; double test5; double average; String input; //Students Full Name name = JOptionPane.showInputDialog("Enter students " + "name."); //Decimal formatter DecimalFormat dF = new DecimalFormat("#0.00"); // Get test grade in numerical values input = JOptionPane.showInputDialog("Enter grade for test1"); test1 = Double.parseDouble(input); input = JOptionPane.showInputDialog("Enter grade for test2"); test2 = Double.parseDouble(input); input = JOptionPane.showInputDialog("Enter grade for test3"); test3 = Double.parseDouble(input); input = JOptionPane.showInputDialog("Enter grade for test4"); test4 = Double.parseDouble(input); input = JOptionPane.showInputDialog("Enter grade for test5"); test5 = Double.parseDouble(input); //Get average score average = (test1 + test2 + test3 + test4 + test5) / 5.0; // Output the average score. JOptionPane.showMessageDialog(null, "The average is for " + average ); // Display the grade. if (average < 60) { JOptionPane.showMessageDialog(null, "Letter Grade = F."); } else { if (average < 70) { JOptionPane.showMessageDialog(null, "Letter Grade = D."); } else { if (average < 80) { JOptionPane.showMessageDialog(null, "Letter Grade = C."); } else { if (average < 90) { JOptionPane.showMessageDialog(null, "Letter Grade = B."); } else { JOptionPane.showMessageDialog(null, "Letter Grade = A."); } } } //final message JOptionPane.showMessageDialog(null, "The average for\n " + name + " is " + average ); System.exit(0); }}}