Given the following code:
private static double sum(double x, double y) {
double total = x + y;
return total;
}
a. What are the formal parameters of this method? (3 points)
Blank 1
b. What is the method body? (3 points)
Blank 2
c. What is the method header? (3 points)
Blank 3
d. What is the method modifier? (3 points)
Blank 4
e. What is the return type? (3 points)
Blank 5
f. What is the return value? (3 points)
Blank 6
g. Write a single line of code that declares a variable called‘score’, calls this method with 2.0 and 3.0, and uses the return toinitialize it. (3 points)
in java
Given the following code: private static double sum(double x, double y) { double total = x + y; return total; } a. What
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am