vault backup: 2024-02-09 10:58:22
This commit is contained in:
@@ -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() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user