The finished class is given below.
MusicVideo
Class
The show()
method for MusicVideo
can use super.show()
where ever it needs to.
It is the first statement (below) because that is
where it makes the most sense.
class VideoTape
{
// stuff ommitted here
public void show()
{
System.out.println( title + ", " + length + " min. available:" + avail );
}
}
class MusicVideo extends VideoTape
{
String artist;
String category;
// constructor
public MusicVideo ( String ttl, int len, String art, String cat )
{
super( ttl, len );
artist = art;
category = cat;
}
public void show()
{
super.show();
System.out.println( "artist:" + artist + " style: " + category );
}
}