We\'ve been learning about methods in java (using netbeans) in class and I\'m still a bit confused about using methods. One homework question basically asks to design a grade ca
As you can see scoreCalc
method needs a set of parameters, but you call it without parameters.
The second: there is no need in Scanner in = new Scanner(System.in);
into your main(String[] args)
method. You are calling it into scoreCalc
method.
Third: you are calling scoreCalc
twice. The first call is before System.out.println
, the second is into System.out.println
. And your application will ask user twice to enter values.
store result value in a variable and show it later:
double result = scoreCalc(.... required params .....);
System.out.println("Your score is: " + result);