- Joined
- Jan 17, 2004
Ok so here i am again
Create a new class named NoSuchCustomerException.
A. Extends Exception.
B. It has a private String data member named customerNumber, not initialized.
C. Create a null constructor (nothing in the argument, nothing in the body of code).
D. Write a second constructor that accepts a String parameter that receives the customer number. This constructor performs the following.
1.) Should pass this message to its parent class, “The customer number [insert uppercase customer number variable here] does not exist.” Yes, this is a super(…).
2.) Assign the customerNumber value received and initialize the customerNumber data member.
3.) Watch for the two space left margin; it’s often ignored at an 8-point penalty for (not) offside’s.
I left out E as it wasnt included in my copy paste attempt but it doesnt mean much as its an easy step ..
this is what i have so far and im hung up on D 1. the super part
Create a new class named NoSuchCustomerException.
A. Extends Exception.
B. It has a private String data member named customerNumber, not initialized.
C. Create a null constructor (nothing in the argument, nothing in the body of code).
D. Write a second constructor that accepts a String parameter that receives the customer number. This constructor performs the following.
1.) Should pass this message to its parent class, “The customer number [insert uppercase customer number variable here] does not exist.” Yes, this is a super(…).
2.) Assign the customerNumber value received and initialize the customerNumber data member.
3.) Watch for the two space left margin; it’s often ignored at an 8-point penalty for (not) offside’s.
I left out E as it wasnt included in my copy paste attempt but it doesnt mean much as its an easy step ..
this is what i have so far and im hung up on D 1. the super part
Code:
public class NoSuchCustomerException extends Exception
{
private String customerNumber;
public NoSuchCustomerException(){}
public NoSuchCustomerException(String customerNumber)
{
}
}