|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.inf111.dvdvendor.app.DVD
public class DVD
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 |
---|
private BarCode barCode
private java.lang.String title
private java.lang.Double price
private java.lang.String plot
private Utils.genre[] genre
private java.lang.String runningTime
private java.lang.String starring
Constructor Detail |
---|
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)
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 |
---|
public BarCode getBarCode()
getBarCode
in interface Product
public double getPrice()
getPrice
in interface Product
public void setTitle(java.lang.String title)
public java.lang.String getTitle()
public void setPlot(java.lang.String plot)
public java.lang.String getPlot()
public void setGenre(Utils.genre[] genre)
public Utils.genre[] getGenre()
public void setRunningTime(java.lang.String runningTime)
public java.lang.String getRunningTime()
public void setStarring(java.lang.String starring)
public java.lang.String getStarring()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |