Ok so this is the stuff I am working on right now:
2. Create a class named NoSuchCustomerException.java. Without this already in place, you will not be able to compile your CustomerIO class.
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). NAMI.
D. It should have a second constructor that accepts a String parameter that receives the customer number. This constructor performs the fowllowing.
1.) Should pass the 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 offsides.
E. Create an String method named getCustomerNumber. Its only job is to return the customerNumber value.
and this is all I have so far:
I Don't understand what the book means by passing the message to the parent class... and also #2..public class NoSuchCustomerException extends Exception { private String customerNumber; public void Constructor(){ } public String notFound(String customerNumber){ return " The customer number " + customerNumber.toUpperCase() + " does not exist"; } }
Any help going in the right direction would be deeply appreciated, thank you!