This may be really easy to figure out but I guess i'm not understanding with the following code
I get an error cannot find symbol in the printInformation method. But the printInfo(); seems to work just fine in the print method second from the bottom.
I want the method to print the customer info given the customer id number. So i'm trying to create a method that will print that info out.
maybe this helps
Look at "num.printInfo();". What is "num" ? It's a String. printInfo() is not a method of the String class. Where is that method ? In the Customer class ? Then you have to call it on a customer, not on a String.
So now since it's not a string type anymore, how will it be able to print out the correct customer given a customer number (customerNum) string. This is the code from main.
customerSearch should return a Customer, instead of returning a boolean. Then you can use the returned value to print the information. If the returned value is null, then the customerId does not exist.
So I think I understand the concept. but I still need the original customerSearch method because it is used by another method. So I would make a second customerSearchTwo and have it return Customer.
I don't even know how to spell CIA. But this tiny ad does: