#BlueJ class context comment0.params= comment0.target=Library() comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Library\n comment1.params=item comment1.target=void\ storeItem(LibraryItem) comment1.text=\n\ Inserts\ object\ value\ item\ alongside\ key\ of\ @itemCode\ into\ @itemsMap.\n comment10.params= comment10.target=void\ writeUserData() comment10.text=\n\ A\ method\ to\ output\ all\ user\ data\ to\ a\ file\ using\ a\ fileDialog\ to\ specify\ file\ location.\n\ \n comment11.params= comment11.target=void\ readLibraryReservationData() comment11.text=\n\ Read\ Library\ Reservation\ Data\ from\ a\ file\ specified\ by\ the\ user.\n comment12.params= comment12.target=void\ readData() comment12.text=\n\ A\ method\ to\ read\ all\ data\ from\ files\ using\ a\ fileDialog\ to\ specify\ file\ location.\n\ This\ will\ create\ the\ corresponding\ objects\ depending\ on\ flags\ contained\ in\ the\ file\n\ and\ populate\ it's\ fields.\n\ \n\ Default\ flag\ value\:\ "book",\ to\ support\ legacy\ files.\ This\ will\ not\ interfere\ with\ \n\ files\ of\ different\ flag\ orders.\n comment13.params=userID\ itemCode\ startDate\ noOfDays comment13.target=boolean\ makeLibraryReservation(java.lang.String,\ java.lang.String,\ java.lang.String,\ int) comment13.text=\n\ Create\ a\ reservation\ to\ allow\ a\ user\ to\ reserve\ an\ item\ from\ the\ library.\n comment14.params=reservationNo comment14.target=void\ deleteLibraryReservation(java.lang.String) comment2.params=user comment2.target=void\ storeUser(LibraryUser) comment2.text=\n\ Inserts\ object\ value\ user\ alongside\ key\ of\ @userID\ into\ @customerMap.\n\ If\ the\ userID\ is\ set\ to\ unknown,\ it\ will\ call\ @generateUserID.\n comment3.params=reservation comment3.target=void\ storeLibraryReservation(LibraryReservation) comment3.text=\n\ Inserts\ object\ value\ reservation\ alongside\ key\ of\ @reservationNo\ into\ @libraryReservationMap.\n comment4.params= comment4.target=java.lang.String\ generateReservationNo() comment4.text=\n\ Generate\ a\ sequential\ reservation\ number.\ Since\ Maps\ do\ not\ have\ an\ index,\ we\ cannot\ simply\ get\ the\ last\ value,\ \n\ and\ recursion\ would\ be\ too\ intensive\ for\ this\ application.\ As\ a\ placeholder\ for\ the\ file\ output,\ a\ field\ variable\n\ is\ used\ to\ hold\ the\ last\ highest\ value\ for\ the\ reservation\ number.\ Unlike\ @generateUserID,\ this\ has\ a\ maximum\ value\n\ hardcoded\ to\ the\ spec.\ This\ likely\ will\ not\ be\ an\ issue\ since\ we\ can\ still\ have\ 1,000,000\ reservations.\n comment5.params=prefix\ length comment5.target=java.lang.String\ generateUserID(java.lang.String,\ int) comment5.text=\n\ Returns\ a\ random\ unique\ user\ ID\ by\ specifying\ \n\ @prefix\ -\ arbitrary\ alphanumeric\ prefix\n\ @length\ -\ length\ of\ numeric\ ID\n\ and\ returning\ a\ unique\ user\ id\n\ @uuid\ -\ a\ unique\ string\ starting\ with\ @prefix,\ and\ concat.\ with\ a\ random\ number\n\ \n\ Example\:\ length\ \=\ 6,\ expected\ result\ should\ be\ under\ 999,999\ and\ above\ 99,999.\n\ If\ we\ just\ use\ 10^(length),\ this\ would\ generate\ any\ number\ under\ 1,000,000.\n\ This\ is\ an\ issue\ since\ any\ integers\ below\ 100,000\ can\ be\ used,\ which\ would\ be\ incorrect.\n\ By\ using\ the\ offset\ of\ a\ factor\ of\ 10\ below\ the\ desired\ length\ we\ can\ generate\ between\ 0\ and\ 899,999.\n\ After\ this,\ we\ can\ add\ 100,000\ back\ to\ the\ number\ to\ ensure\ a\ baseline\ length\ is\ maintained.\n\ \n\ Note\:\ I\ am\ aware\ that\ this\ is\ overengineered,\ and\ that\ several\ random\ integers\ of\ amount\ @length\ could\ be\ used,\ \n\ but\ this\ is\ considerably\ more\ efficient\ since\ there\ is\ no\ iteration\ involved\ in\ the\ creation\ of\ the\ ID.\ O(1)\n comment6.params= comment6.target=void\ printLibraryReservations() comment6.text=\n\ Prints\ to\ the\ terminal,\ in\ a\ human-readable\ format,\ library\ reservation\ in\ the\ itemList\n\ \n\ Contains\ a\ marker\ at\ the\ start\ and\ end\ to\ visualise\ in\ terminal\ output.\n comment7.params= comment7.target=void\ printAll() comment7.text=\n\ Prints\ to\ the\ terminal,\ in\ a\ human-readable\ format,\ all\ items\ in\ the\ itemList\n\ \n\ Contains\ a\ marker\ at\ the\ start\ and\ end\ to\ visualise\ in\ terminal\ output.\n comment8.params=start\ end comment8.target=void\ printDiaryEntries(java.lang.String,\ java.lang.String) comment9.params= comment9.target=void\ writeLibraryReservationData() comment9.text=\n\ Write\ all\ current\ library\ reservations\ to\ a\ file\ specified\ by\ the\ user.\n numComments=15