|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pretzelpalace.PretzelStore
Constructor Summary | |
PretzelStore()
Creates default new PretzelStore |
|
PretzelStore(int inv,
double price,
double profit)
Creates new PretzelStore - with non defaults |
Method Summary | |
double |
getMargin()
report amount of profit per pretzel |
double |
getSalePrice()
report price for each pretzel sold |
int |
getStart()
report number of pretzels that have ever been in the store |
double |
getTotalInventoryValue()
report total inventory value |
double |
getTotalProfit()
report total profit for the day |
static void |
main(java.lang.String[] args)
dummy driver - not currnetly doing anything |
boolean |
orderNewBatch(int numBatches)
increase current inventory levels by ordering a new batch of pretzels Pretzels come in batches of 12 Assume they arrive immediately Checks to ensure don't order negative batches returns boolean indicating whether successful |
boolean |
sell(int num)
Sell given number of pretzels - reflecting in instance variables First ensure that that many are available returns boolean indicating whether successful |
boolean |
setMargin(double amt)
Change profit margin Checks to ensure don't take margin negative returns boolean indicating whether successful |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PretzelStore()
public PretzelStore(int inv, double price, double profit)
Method Detail |
public int getStart()
public double getSalePrice()
public double getMargin()
public double getTotalProfit()
public double getTotalInventoryValue()
public boolean orderNewBatch(int numBatches)
public boolean setMargin(double amt)
public boolean sell(int num)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |