vault backup: 2024-03-05 13:01:43
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
|
||||
/**
|
||||
* Write a description of class Periodical here.
|
||||
* Subclass of LibraryItem to create a periodical ( e.g. newspaper, tabloid ).
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
* @George Wilkinson
|
||||
* @1.0
|
||||
*/
|
||||
|
||||
import java.util.Scanner;
|
||||
public class Periodical extends LibraryItem
|
||||
|
||||
public class Periodical extends PrintedItem
|
||||
{
|
||||
private String publicationDate;
|
||||
|
||||
public Periodical(){}
|
||||
|
||||
public void printDetails() {
|
||||
System.out.println("\n==================\n( " + getItemCode() + " )" + " Publication Date: " + publicationDate + " Periodical " + getTitle() + ", published by " + getPublisher() + " has " + getNoOfPages() + " pages .\nIt has been borrowed " + getTimesBorrowed() + " times.");
|
||||
if( getOnLoan() )
|
||||
System.out.println( "The Periodical is currently on loan, and costs " + getCost() + " pence. ");
|
||||
else
|
||||
System.out.println( "The Periodical is currently not on loan, and costs " + getCost() + " pence. ");
|
||||
System.out.println( "Publication Date: " + publicationDate );
|
||||
super.printDetails();
|
||||
}
|
||||
|
||||
public void readItemData( Scanner detailScanner ){
|
||||
|
Reference in New Issue
Block a user