Hi all,
I need to write this program today and I really struggle :-( Would you be able to help at all?
public class ISPN
{
private int[] authorId;
private int[] programId;
/**
* Creates a new instance of ISPN
*/
public ISPN(int[] anAuthorId, int[] aProgramId) //constructor that takes two array arguments and uses them to set the values of author/program identifier)
{
// TODO
}
public boolean isValidLength() //method that returns true if author id and program id together compromise 6 integers, otheriwse false
{
return false;
}
public boolean isAllValidDigits() //method that returns true if author id and program id are in the valid range 0-9 inclusive, otherwise returns false
{
// TODO
return false;
}
public String getAuthorIdAsString()//method that returns string constructed by the digits in the array that represents author identifier
{
// TODO
return null;
}
public String getProgramIdAsString()
{
// TODO
return null;
}
public int calculateCheckDigit() //method that calculates the check digit and returns it as an int value
{
// TODO
return 0;
}
public String toString()
{
// TODO
return null;
}
public boolean equals(ISPN ispn)
{
// TODO
return false;
}
}
Many thanks
Magda