Limited access

Upgrade to access all content for this subject

Consider the following method, which is intended to average two numbers and return the result.

public double averageNumbers(int num1, int num2)
{
    // implementation not shown
}

You would like to add other methods that handle different data types and/or different situations, and you would like to name these methods with the same name as this original method.

Which one of the following method signatures would NOT compile successfully?

A
public int averageNumbers(double num1, double num2)
B
public double averageNumbers(double num1, int num2)
C
public double averageNumbers(int num1, int num2, int decimals)
D
public double averageNumbers(int num1, double num2)
E
public int averageNumbers(int num1, int num2)
Select an assignment template