You are on page 1of 2

CLASS ACTIVITY : METHODS

// Complete the program below.

//getSum() will receive 3 marks and return the total

//getAverage() will receive the total and return the avearge

//getStatus() will receive the average and return "PASS" if average is more or equal 50 , otherwise
//return "FAIL".

package methods;

import java.util.Scanner;

public class Methods {

public static void main(String[] args)

Scanner input = new Scanner(System.in);

int mark1,mark2,mark3,total;

double avg;

String status;

System.out.print("Enter 3 marks :");

mark1 = input.nextInt();

mark2 = input.nextInt();

mark3 = input.nextInt();

total = getSum(_____,______, ________);

avg = getAvearge(_________);

status = getStatus(_____________);

System.out.println(_________);

}
public static int getSum(_________________________)

______________________;

public static double getAvearge(____________________)

_______________________;

public static String getStatus(______________________)

if (________________)

return(___________________);

else

return(___________________);

You might also like