Free Version
Difficult

# Crazy Arithmetic: Classes

APCSA-TKPEGL

Consider the following class.

    public class CrazyArithmetic
{

public CrazyArithmetic(int a, int b, String operator)
{
if (operator.equals("/"))
else
if (operator.equals("*"))
else
if (operator.equals("-"))
else
if (operator.equals("+"))
}

public CrazyArithmetic(double a, double b, String operator)
{
if (operator.equals("/"))
else
if (operator.equals("*"))
else
if (operator.equals("-"))
else
if (operator.equals("+"))
}

public CrazyArithmetic(double a, int b, String operator)
{
}

public CrazyArithmetic(int a, double b, String operator)
{
}

{
}

}


What is output to the console from this segment of code from the main method?

CrazyArithmetic ca1 = new CrazyArithmetic(5.0, 10.0, "/");
CrazyArithmetic ca2 = new CrazyArithmetic(4, 5, "+");
CrazyArithmetic ca3 = new CrazyArithmetic(10.0, 4, "/");
CrazyArithmetic ca4 = new CrazyArithmetic(8, 7.0, "+");
CrazyArithmetic ca5 = new CrazyArithmetic(5, 10, "/");

A

0, 9.0, 2, 15.0, 0.5

B

0.5, 9, 2.5, 15.0, 0

C

0, 9.0, null, null, 0.5

D

0.5, 9.0, 2.5, 15.0, 0.0

E