vault backup: 2024-02-09 10:58:22

This commit is contained in:
2024-02-09 10:58:22 +00:00
parent 0126991874
commit 1e824525b0
18 changed files with 760 additions and 28 deletions

View File

@@ -8,6 +8,7 @@
import java.util.Scanner;
import java.util.ArrayList;
import java.util.NoSuchElementException;
public class LibraryItem
{
@@ -116,10 +117,13 @@ public class LibraryItem
}
public void readData( Scanner detailScanner ) {
this.title = detailScanner.next();
this.itemCode = detailScanner.next();
this.cost = Integer.parseInt( detailScanner.next() );
this.timesBorrowed = Integer.parseInt( detailScanner.next() );
this.onLoan = Boolean.parseBoolean( detailScanner.next() );
if ( detailScanner != null ) {
this.title = detailScanner.next().trim();
this.itemCode = detailScanner.next().trim();
this.cost = Integer.parseInt( detailScanner.next() );
this.timesBorrowed = Integer.parseInt( detailScanner.next() );
this.onLoan = Boolean.parseBoolean( detailScanner.next() );
}
}
}