Question: How to correct the following error? Error: Exception in thread main java.lang.Error: Unresolved compilation problem: The constructor TaxNonExemptCustomer(String, int, double, String, double) is undefined at

How to correct the following error?

Error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:

The constructor TaxNonExemptCustomer(String, int, double, String, double) is undefined

at Program8.main(Program8.java:88)

Code:

public class TaxNonExemptCustomer extends OfficeCustomerClass{

private double taxLiabilityElement;

public TaxNonExemptCustomer()

{

super();

taxLiabilityElement=0;

}

public TaxNonExemptCustomer(String nameElement, int id, double billBalanceElement, String email,double taxLiabilityElement)

{

super(nameElement,id,billBalanceElement,email);

settaxLiabilityElement(taxLiabilityElement);

}

public void settaxLiabilityElement(double taxLiabilityElement)

{

this.taxLiabilityElement = ((taxLiabilityElement*getbillBalanceElement())/100);

}

public double gettaxLiabilityElement()

{

return taxLiabilityElement ;

}

public String toString()

{

return(super.toString()+"\t"+taxLiabilityElement);

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!