vault backup: 2024-04-12 09:39:31

This commit is contained in:
2024-04-12 09:39:31 +01:00
parent e241fe8bd6
commit 30bfa6f243
73 changed files with 762 additions and 403 deletions

View File

@@ -0,0 +1,55 @@
/**
* Subclass of LibraryItem to create objects of audio and visual items in a library.
*
* @George Wilkinson
* @1.2
*/
import java.util.Scanner;
public abstract class AudioVisual extends LibraryItem
{
private int playingTime;
/*
* Field Accessor Start
*/
public int getPlayingTime()
{
return playingTime;
}
/*
* Field Accessor End
*
* Field Mutator Start
*/
public void setPlayingTime( int playingTime )
{
this.playingTime = playingTime;
}
/*
* Field Mutator End
*/
public void printDetails()
{
System.out.println( "Playing Time: " + playingTime );
super.printDetails();
}
/**
* Populate the fields with details from the scanner
* Takes Parameters
* Scanner @detailScanner
*/
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.playingTime = Integer.parseInt( detailScanner.next().trim() );
super.readItemData( detailScanner );
}
}
}