Class MoviePlayer
- java.lang.Object
-
- Product
-
- MoviePlayer
-
- All Implemented Interfaces:
Item,MultimediaControl
public class MoviePlayer extends Product implements MultimediaControl
Extends the product class to create a movie player product- Author:
- Jairo Garciga
-
-
Field Summary
Fields Modifier and Type Field Description MonitorTypemonitorTypeScreenscreen
-
Constructor Summary
Constructors Constructor Description MoviePlayer(java.lang.String name, java.lang.String manufacturer, Screen screen, MonitorType monitorType)Constructor for the MoviePlayer class which calls Product constructor to set up all the variables and then sets up it's object variables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnext()Output that the player is going to the next movievoidplay()Output that the movie is playingvoidprevious()Output that the player is going to the previous movievoidstop()Output that the movie is stoppingjava.lang.StringtoString()Calls Product toString method and then appends the screen and monitor type-
Methods inherited from class Product
getID, getItemCode, getManufacturer, getName, getType, setID, setManufacturer, setName, setType
-
-
-
-
Field Detail
-
screen
public Screen screen
-
monitorType
public MonitorType monitorType
-
-
Constructor Detail
-
MoviePlayer
public MoviePlayer(java.lang.String name, java.lang.String manufacturer, Screen screen, MonitorType monitorType)Constructor for the MoviePlayer class which calls Product constructor to set up all the variables and then sets up it's object variables.- Parameters:
name- The name of the movie playermanufacturer- The manufacturer of the movie playerscreen- The screen type of the movie playermonitorType- The monitor type of the movie player
-
-
Method Detail
-
toString
public java.lang.String toString()
Calls Product toString method and then appends the screen and monitor type
-
play
public void play()
Output that the movie is playing- Specified by:
playin interfaceMultimediaControl
-
stop
public void stop()
Output that the movie is stopping- Specified by:
stopin interfaceMultimediaControl
-
previous
public void previous()
Output that the player is going to the previous movie- Specified by:
previousin interfaceMultimediaControl
-
next
public void next()
Output that the player is going to the next movie- Specified by:
nextin interfaceMultimediaControl
-
-