edu.uci.ics.inf111.dvdvendor.app
Class DVD

java.lang.Object
  extended by edu.uci.ics.inf111.dvdvendor.app.DVD
All Implemented Interfaces:
Product

public class DVD
extends java.lang.Object
implements Product

A DVD represents a single bar-code-bearing product in the point of sale. This class contains the main characteristics of a DVD for rent.


Field Summary
private  BarCode barCode
          The bar code for this DVD.
private  Utils.genre[] genre
          The genre for this DVD.
private  java.lang.String plot
          The plot for this DVD.
private  java.lang.Double price
          The price for this DVD.
private  java.lang.String runningTime
          The running time for this DVD.
private  java.lang.String starring
          The starring for this DVD.
private  java.lang.String title
          The title for this DVD.
 
Constructor Summary
DVD(BarCode barCode, java.lang.String title, double price, java.lang.String plot, Utils.genre[] genre, java.lang.String runningTime, java.lang.String starring)
          This constructor stores all relevant details of the product, which can be retrieved using accessor methods.
 
Method Summary
 BarCode getBarCode()
          An accessor method which returns the bar code for the DVD.
 Utils.genre[] getGenre()
          An accessor method which returns the array of genres for the DVD.
 java.lang.String getPlot()
          An accessor method which returns the plot for the DVD.
 double getPrice()
          An accessor method which returns the price for the DVD.
 java.lang.String getRunningTime()
          An accessor method which returns the running time for the DVD.
 java.lang.String getStarring()
          An accessor method which returns the starring for the DVD.
 java.lang.String getTitle()
          An accessor method which returns the title for the DVD.
 void setGenre(Utils.genre[] genre)
          An accessor method which sets array of genres for the DVD.
 void setPlot(java.lang.String plot)
          An accessor method which sets the plot for the DVD.
 void setRunningTime(java.lang.String runningTime)
          An accessor method which sets the running time for the DVD.
 void setStarring(java.lang.String starring)
          An accessor method which sets the starring for the DVD.
 void setTitle(java.lang.String title)
          An accessor method which sets the title for the DVD.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

barCode

private BarCode barCode
The bar code for this DVD.


title

private java.lang.String title
The title for this DVD.


price

private java.lang.Double price
The price for this DVD.


plot

private java.lang.String plot
The plot for this DVD.


genre

private Utils.genre[] genre
The genre for this DVD.


runningTime

private java.lang.String runningTime
The running time for this DVD.


starring

private java.lang.String starring
The starring for this DVD.

Constructor Detail

DVD

public DVD(BarCode barCode,
           java.lang.String title,
           double price,
           java.lang.String plot,
           Utils.genre[] genre,
           java.lang.String runningTime,
           java.lang.String starring)
This constructor stores all relevant details of the product, which can be retrieved using accessor methods.

Parameters:
barCode - A unique 12-digit bar code for the DVD.
title - A title for the DVD.
price - A price for the DVD.
plot - A plot for the DVD.
genre - A list of genres for the DVD.
runningTime - Running time for the DVD.
starring - Starring for the DVD.
Method Detail

getBarCode

public BarCode getBarCode()
An accessor method which returns the bar code for the DVD.

Specified by:
getBarCode in interface Product

getPrice

public double getPrice()
An accessor method which returns the price for the DVD.

Specified by:
getPrice in interface Product

setTitle

public void setTitle(java.lang.String title)
An accessor method which sets the title for the DVD.


getTitle

public java.lang.String getTitle()
An accessor method which returns the title for the DVD.


setPlot

public void setPlot(java.lang.String plot)
An accessor method which sets the plot for the DVD.


getPlot

public java.lang.String getPlot()
An accessor method which returns the plot for the DVD.


setGenre

public void setGenre(Utils.genre[] genre)
An accessor method which sets array of genres for the DVD.


getGenre

public Utils.genre[] getGenre()
An accessor method which returns the array of genres for the DVD.


setRunningTime

public void setRunningTime(java.lang.String runningTime)
An accessor method which sets the running time for the DVD.


getRunningTime

public java.lang.String getRunningTime()
An accessor method which returns the running time for the DVD.


setStarring

public void setStarring(java.lang.String starring)
An accessor method which sets the starring for the DVD.


getStarring

public java.lang.String getStarring()
An accessor method which returns the starring for the DVD.