|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object retail.Product retail.DVD
public class DVD
Field Summary | |
---|---|
static double |
DEFAULT_COST
default wholesale cost for us for a DVD |
static double |
DEFAULT_PRICE
default sales price for a DVD |
static int |
REORDER_BATCH
amount to re-order when re-supplying inventory |
Fields inherited from class retail.Product |
---|
currInventory, name, sku, totalSold |
Constructor Summary | |
---|---|
DVD()
Creates a new instance of DVD |
|
DVD(int skuLen,
java.lang.String nam,
double price,
double cost,
int inv,
int sold,
MovieGenre gr,
MovieRating rat,
int len)
Creates a new instance of DVD given all info except sku is passed as a length - generating an SKU randomly |
|
DVD(int skuLen,
java.lang.String nam,
double price,
double cost,
int inv,
int sold,
java.lang.String genr,
java.lang.String rat,
int len)
Creates a new instance of DVD given all info except sku is passed as a length - generating an SKU randomly. |
|
DVD(java.util.Scanner lineScan)
Creates a new instance of DVD given a properly positioned scanner - pointing to the appropriate place in a comma delimited string containing the name, cost, price, inventory, number sold, and (string representing the) genre and rating and the length (such as might be obtained via reading in a file that has one line per Song) Assumes info is organized in that order. |
|
DVD(java.lang.String allInfo)
Creates a new instance of DVD given a comma delimited string containing the name, cost, price, artist and (string representing the) genre and rating and the length (such as might be obtained via reading in a file that has one line per DVD) Assumes info is organized in that order. |
|
DVD(java.lang.String nam,
double price,
double cost,
int inv,
int sold,
MovieGenre gr,
MovieRating rat,
int len)
Creates a new instance of DVD given all info except sku - generating an SKU randomly |
|
DVD(java.lang.String nam,
double price,
double cost,
int inv,
int sold,
java.lang.String genr,
java.lang.String rat,
int len)
Creates a new instance of DVD given all info except sku - generating an SKU randomly. |
|
DVD(java.lang.String id,
java.lang.String nam,
double price,
double cost,
int inv,
int sold,
MovieGenre gr,
MovieRating rat,
int len)
Creates a new instance of DVD given all info |
|
DVD(java.lang.String id,
java.lang.String nam,
double price,
double cost,
int inv,
int sold,
java.lang.String genr,
java.lang.String rat,
int len)
Creates a new instance of DVD given all info. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object toCompare)
report whether passed object is completely equal in contents to invoking object |
MovieGenre |
getGenre()
report dvd genre |
java.lang.String |
getGenreString()
report dvd genre as a String |
int |
getLength()
report dvd length (in minutes) |
MovieRating |
getRated()
report dvd rating |
java.lang.String |
getRatedString()
report dvd rating as a String |
boolean |
setGenre(MovieGenre gen)
change dvd genre No way to validate? |
boolean |
setGenre(java.lang.String gen)
change dvd genre - passing a string Make sure string corresponds to a real genre |
boolean |
setLength(int len)
change dvd length No way to validate? Well lets force it to be between 50 minutes and 400 |
boolean |
setRated(MovieRating rat)
change dvd rating No way to validate? |
boolean |
setRated(java.lang.String rat)
change dvd genre - passing a string Make sure string corresponds to a real genre |
java.lang.String |
toShortString()
create a short string representation for the DVD object |
java.lang.String |
toString()
create a string representation for the CD object |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_PRICE
public static final double DEFAULT_COST
public static final int REORDER_BATCH
Constructor Detail |
---|
public DVD()
public DVD(java.lang.String nam, double price, double cost, int inv, int sold, MovieGenre gr, MovieRating rat, int len)
public DVD(int skuLen, java.lang.String nam, double price, double cost, int inv, int sold, MovieGenre gr, MovieRating rat, int len)
public DVD(java.lang.String id, java.lang.String nam, double price, double cost, int inv, int sold, MovieGenre gr, MovieRating rat, int len)
public DVD(java.lang.String nam, double price, double cost, int inv, int sold, java.lang.String genr, java.lang.String rat, int len)
public DVD(int skuLen, java.lang.String nam, double price, double cost, int inv, int sold, java.lang.String genr, java.lang.String rat, int len)
public DVD(java.lang.String id, java.lang.String nam, double price, double cost, int inv, int sold, java.lang.String genr, java.lang.String rat, int len)
public DVD(java.lang.String allInfo)
public DVD(java.util.Scanner lineScan)
Method Detail |
---|
public MovieGenre getGenre()
public java.lang.String getGenreString()
public MovieRating getRated()
public java.lang.String getRatedString()
public int getLength()
public boolean setGenre(MovieGenre gen)
public boolean setGenre(java.lang.String gen)
public boolean setRated(MovieRating rat)
public boolean setRated(java.lang.String rat)
public boolean setLength(int len)
public java.lang.String toString()
toString
in class Product
public boolean equals(java.lang.Object toCompare)
equals
in class Product
public java.lang.String toShortString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |