follow the To Do list in the comments to finish the program, and send a response to this topic with your .class files attached. Also, please include your name in the output as the program's author. /* Week2 in-class exercise Name: Average.java Author: James Gao Date: 01/10/2010 */ public class Average { public static void main(String[] args) { double grade1 = 76.0; double grade2 = 83.0; double grade3 = 62.0; // TO DO: // // a. Compute and display the average grade // b. Display a PASS/FAIL message // average >= 75.0 PASS // average < 75.0 FAIL System.out.println("Author: Your Name"); } }
/* Week2 in-class exercise Name: Average.java Author: James Gao Date: 01/10/2010 */ public class Average { public static void main(String[] args) { double grade1 = 76.0; double grade2 = 83.0; double grade3 = 62.0; // TO DO: // // a. Compute and display the average grade // b. Display a PASS/FAIL message // average >= 75.0 PASS // average < 75.0 FAIL System.out.println("Author: Your Name"); double average = (grade1+grade2+grade3)/3; System.out.println("Average: " + average); if (average >= 75.0) { System.out.println("PASS"); } else { System.out.println("FAIL"); } } }
Get Answers For Free
Most questions answered within 1 hours.