Class AudioPlayer
- java.lang.Object
-
- Product
-
- AudioPlayer
-
- All Implemented Interfaces:
Item,MultimediaControl
public class AudioPlayer extends Product implements MultimediaControl
A class that extends Product and creates an audio player.- Author:
- Jairo Garciga
-
-
Constructor Summary
Constructors Constructor Description AudioPlayer(java.lang.String name, java.lang.String manufacturer, java.lang.String supportedAudioFormats, java.lang.String supportedPlaylistFormats)Creates a specific Audio object, extends Product so it can implement it's methods and constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnext()Outputs that the device is going to the next songvoidplay()Outputs that the device is playingvoidprevious()Outputs that the device is going to the previous songvoidstop()Outputs that the device is stoppingjava.lang.StringtoString()First the method grabs the string from the parent class and concatenates it's portion to it afterwards-
Methods inherited from class Product
getID, getItemCode, getManufacturer, getName, getType, setID, setManufacturer, setName, setType
-
-
-
-
Constructor Detail
-
AudioPlayer
public AudioPlayer(java.lang.String name, java.lang.String manufacturer, java.lang.String supportedAudioFormats, java.lang.String supportedPlaylistFormats)Creates a specific Audio object, extends Product so it can implement it's methods and constructor- Parameters:
name- The name of the AudioPlayermanufacturer- The name of the ManufacturersupportedAudioFormats- The audio format, MP3, etc.supportedPlaylistFormats- The supported Playlist format
-
-
Method Detail
-
toString
public java.lang.String toString()
First the method grabs the string from the parent class and concatenates it's portion to it afterwards
-
play
public void play()
Outputs that the device is playing- Specified by:
playin interfaceMultimediaControl
-
stop
public void stop()
Outputs that the device is stopping- Specified by:
stopin interfaceMultimediaControl
-
previous
public void previous()
Outputs that the device is going to the previous song- Specified by:
previousin interfaceMultimediaControl
-
next
public void next()
Outputs that the device is going to the next song- Specified by:
nextin interfaceMultimediaControl
-
-