Limited access

Upgrade to access all content for this subject

Consider the following Customer class.

public class Customer 
{
    private int custNum; 
    private String firstName;
    private String lastName;
    private String homePhone = "";
    private double totPurchaseAmt = 0;

    public Customer(int cNum, String fName, String lName, String hPhone, double totPurch)
    {
        custNum = cNum;
        firstName = fName;
        lastName = lName;
        homePhone = hPhone;
        totPurchaseAmt = totPurch;
    }

    public Customer(int cNum, String fName, String lName, double totPurch)
    {
        custNum = cNum;
        firstName = fName;
        lastName = lName;
        totPurchaseAmt = totPurch;
    }

    public Customer(int cNum, String fName, String lName)
    {
        custNum = cNum;
        firstName = fName;
        lastName = lName;
    }

    // other data and methods not shown
}

Which of the following statements will result in a syntax error?

A
Customer greg = new Customer(56246, "Greg", "Johnson");
B
Customer valerie = new Customer(300, "Valerie Sims", "436-945-7020");
C
Customer betty = new Customer(200, "Betty", "Lewis", "446-463-9515");
D
Customer gene = new Customer(199, "Gene", "Shelton", 200.00);
E
Customer joe = new Customer(100, "Joe", "King", "346-238-9435", 200.00);
Select an assignment template