GradeBook

GradeBook - char r = ' '; // find the grade based on the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.lang.*; import java.io.*; /* By: Shayra Medal * Instructor: Walid Akache * Project_6_1 * Question number 7 on page 509 */ public class GradeBook { // uswer defined method to calculate the grade of the student public static char grade( double scores [] ) { // find the average double avg = ( scores[0] + scores[1] + scores[2] + scores[3] ) / 4.0;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: char r = ' '; // find the grade based on the average if (avg > 90 ) r = 'A'; else if ( avg > 80 ) r = 'B'; else if ( avg > 70) r = 'C'; else if (avg > 60 ) r = 'D'; else r = 'F'; //return the grade return r; } //end of method Grade } //method main begins the execution of the program...
View Full Document

This note was uploaded on 09/23/2011 for the course ECO 1123 taught by Professor Josephlichter during the Spring '11 term at FIU.

Ask a homework question - tutors are online