You need to have a variable in your LoanBook class:
bookStatus status;
Type: Posts; User: aussiemcgr
You need to have a variable in your LoanBook class:
bookStatus status;
What does your LoanBook class currently look like?
Is it an error? Perhaps the status variable is not within the scope of that line of code (you cannot access the status variable directly). Add a getter to your LoanBook class, which returns the...
Enums can be compared with ==.
So you can say:
if(bookArray[i].status==BookStatus.AVAILABLE)
Status are generally stored as enumerations: Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
For example, you would have a class like:
public enum BookStatus {...
Ok, well the books have a status. I assume that is an indication for whether they are available, borrowed, or loaned? If so, you need to loop through your bookArray and check each book's status. If...