vault backup: 2024-03-05 13:01:43

This commit is contained in:
2024-03-05 13:01:43 +00:00
parent 8f7a395bdb
commit 8ce640b4ba
44 changed files with 1177 additions and 177 deletions

View File

@@ -1,16 +1,14 @@
/**
* Subclass of LibraryItem that emulates a Book item in a Library
* Subclass of LibraryItem that emulates a Book item.
*
* @George Wilkinson
* @1.0
*/
import java.util.Scanner;
import java.util.ArrayList;
import java.util.NoSuchElementException;
public class Book extends LibraryItem
public class Book extends PrintedItem
{
private String author;
private String isbn;
@@ -21,11 +19,9 @@ public class Book extends LibraryItem
public Book(){}
public void printDetails() {
System.out.println("\n==================\n( " + getItemCode() + " )" + " ISBN: " + isbn + " Book " + getTitle() + ", written by " + author + ", published by " + getPublisher() + " has " + getNoOfPages() + " pages .\nIt has been borrowed " + getTimesBorrowed() + " times.");
if( getOnLoan() )
System.out.println( "The Book is currently on loan, and costs " + getCost() + " pence. ");
else
System.out.println( "The Book is currently not on loan, and costs " + getCost() + " pence. ");
System.out.println( "ISBN: " + isbn +
"\nAuthor: " + author );
super.printDetails();
}
public void readItemData( Scanner detailScanner ){