Sure, the first thing that would help is filling in those methods a bit more.
Did you have any other specific questions?
Yes, please find the question below:
"imagine there's a proposal to develop an International Standard Program Number. Suppose the draft standard shall have the following structire:
an ISPN is always 8 characters long not counting the hyphens
- character 1 is an uppercase P to denote Program
- characters 2-7 are decimal digits representing an author identifier and program identifier. These are of variable length
- character 8 is a check digit in the range 0-8; the check digit is calculated by adding up all the digits of the author identifier and program identifier and then taking the reminder when the total is divided by 9, the check digit can larter be used to detect mistakes in copying the ISPN.
The class should contain the following methods:
1. a constructor that takes two array arguments and used them to set values of the author/program id
2. a method isValidLenght() that returns true if the author/program id together comprise 6 integegers, otherwise returns false
3. a method isAllValidDigits() that returns true if all the int values of author/program id are in the valid range 0-9 inclusive
4. a method getAuthorIdAsString that returns a string constructed by the digits in the author id array
5. a method getProgramIdAsString
6. a method calculateCheckDigit that calculates the check digit and returns it as an int value
7. a method toString that returns a string representing the ISPN
Many thanks
Magda