Question: DEBUG JAVA: Instructions for debug are: Code to copy: DebugCustomer.java public class DebugCustomer { protected int idNumber; protected String name; protected double creditLimit; public DebugCustomer(int
DEBUG JAVA:
Instructions for debug are:


Code to copy:
DebugCustomer.java
public class DebugCustomer
{
protected int idNumber;
protected String name;
protected double creditLimit;
public DebugCustomer(int id, name, double creditLimit)
{
idNumber = id;
name = name;
creditLimit = credit;
}
public void display()
{
System.out.println("Customer # + idNumber +
" Name: " + name, " Credit limit $" + creditLimit);
}
}
DebugCustomerMakingPurchase.java
public class DebugCustomerMakingPurchase extends DebugCustomer
{
private double amountOfPurchase;
private boolean overLimit;
public DebugCustomerMakingPurchase(int id,
String name, double credit, double purchAmount)
{
amountOfPurchase = purchAmount;
if(amountOfPurchase > creditLimit)
overLimit = true;
else
overLimit = true;
}
@Override
public void display()
{
this.display();
System.out.println("Purchase amount $" + amountOfPurchase);
if(overLimit);
System.out.println("****Credit denied - customer over limit");
else
System.out.println("Purchase Okay");
}
}
DebugTen4.java
// A customer's purchase is approved if the
// purchase does not exceed the credit limit
public class DebugTen4
{
public static void main(String args[])
{
int id = 12241;
String name = "Franklin";
double credit = 1000.00;
double purchase = 1325.77;
DebugCustomerMakingPurchase cust =
DebugCustomerMakingPurchase(id, name, credit, purchase);
cust.display();
}
}
Fix errors in starter code 0.00 out of 10.00 O out of 3 checks passed. Review the results below for more details. Checks > Test Case Incomplete Program produces correct output Input utput Results Customer #12241 Name: Franklin Credit limit $1000.6 Purchase amount $1325.77 ****Credit denied - customer over limit Code Pattern Incomplete Parameters specified correctly Description Searched your code for a specific pattern: String name\s*, You can learn more about regular expressions here. Code Pattern Incomplete Subclass calls parent class constructor Description Searched your code for a specific pattern: super\(id, name, credit) You can learn more about regular expressions here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
