All pastes #216026 Raw Edit

Someone

public text v1 · immutable
#216026 ·published 2006-10-22 22:37 UTC
rendered paste body
Add a method called weightedGrade(int iIn) to the Student class. This method will take an number of type 'int' and return a decimal number of type 'float':

    * Obtain the gpa from a call to the method that calculates the gpa and set the result to a variable declared within this method to hold the gpa.
    * Obtain the weighted gpa by adding the input parameter to the gpa and set the result to a variable declared within this method to hold the weighted gpa.
    * Return the weighted gpa. 
=====================
public float weightedGrade(int iIn)
    {
        float weightedGPA;
        float GPA;
        
        //weightedGPA = new GPACalc();
        GPA = GPACalc();
        weightedGPA = GPA + iIn;
        return weightedGPA;
    }