JAVA problem? ISBN number program?

So, in one method in this program I am writing, I have to:

1. return false if the length of the number is not 10 or 13

2. call on the isValid10Digit method for a 10 digit ISBN. isValid10Digit (boolean method) checks that the 10 digit code has a valid check number, and this code is already written.

3. call on the isValid13Digit method for a 13 digit ISBN. Same idea here.

Yet, I can't seem to do these all in one isValid method. What I have right now is it taking a string parameter so that it can take dashes. I then remove the dashes so that you have a string that is really just numbers. I tried putting in:

return (c.length() == 10 || c.length() == 13);

And then I don't know how to "call" on the other two methods now. What does that even mean? What do I do?

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.