Modules:
- bookutils: Manages library system utility functions including book management, tracking issues and returns, and updating book statuses.
Functions:\
name
instance variableauthor
instance variablevolume
instance variablegetIssued(): Returns the value of the issued
instance variable
name
instance variable with provided name
argumentauthor
instance variable with provided author
argumentvolume
instance variable with provided volume
argumentissued
instance variable with provided issued
argumentCLASS Book
PRIVATE name AS STRING
PRIVATE author AS STRING
PRIVATE volume AS STRING
PRIVATE issued AS STRING
METHOD Book(name AS STRING, author AS STRING, volume AS STRING, issued AS STRING)
SET this.name TO name
SET this.author TO author
SET this.volume TO volume
SET this.issued TO issued
END METHOD
METHOD getName() RETURNS STRING
RETURN name
END METHOD
METHOD setName(name AS STRING)
SET this.name TO name
END METHOD
METHOD getAuthor() RETURNS STRING
RETURN author
END METHOD
METHOD setAuthor(author AS STRING)
SET this.author TO author
END METHOD
METHOD getVolume() RETURNS STRING
RETURN volume
END METHOD
METHOD setVolume(volume AS STRING)
SET this.volume TO volume
END METHOD
METHOD add_book(filePath AS STRING)
CALL appendBook FUNCTION FROM BookUtils MODULE BY PASSING filePath AS ARGUMENT
END METHOD
METHOD get_all_books(filePath AS STRING) RETURNS List<Book>
RETURN VALUE OF getBooks FUNCTION FROM BookUtils MODULE BY PASSING filePath AS ARGUMENT
END METHOD
METHOD issue_book(filePath AS STRING, name AS STRING)
CALL updateBookStatus FUNCTION FROM BookUtils MODULE BY PASSING filePath,name AND "yes" AS ARGUMENTS
PRINT "Book issued: " + name
END METHOD
METHOD return_book(filePath AS STRING, name AS STRING)
CALL updateBookStatus FUNCTION FROM BookUtils MODULE BY PASSING filePath,name AND "no" AS ARGUMENTS
PRINT "Book returned: " + name
END METHOD
END CLASS