|
Videoautomat | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectShop
videoautomat.VideoShop
public class VideoShop
This is the central class for this application - the Shop
. It contains the
video-catalog and stock of this video-shop, the shop`s money and therefor a currency-catalog
containing which coins this automat accepts and a Timer
for simulation purposes.
Field Summary | |
---|---|
static String |
C_CURRENCY
Key of the currency - Catalog |
static String |
C_VIDEOS
Key of the video - Catalog |
static String |
CAPTION_AUTOMAT
The Caption of the VideoAutomat |
static String |
CC_VIDEOS
Key of the video - CountingStock |
static String |
FILENAME
The name of the global log file |
static String |
MB_MONEY
Key of the MoneyBag |
static String |
MS_NEW
Label for the menusheet that contains self-defined items |
static String |
MSG_ACCESS
Label for the admin- ActionCapability , if it`s not granted. |
static String |
MSI_AUTOMAT
Label for the button to start the automat |
static String |
MSI_DAY
Label for the time setter button |
Constructor Summary | |
---|---|
VideoShop()
Constructs a new VideoShop and set it as Shop#setTheShop() . |
Method Summary | |
---|---|
static void |
checkRentedVideos()
Method to iterate over all rented videos and taking out those, which renting costs exceed the purchase price |
protected MenuSheet |
createShopMenuSheet()
|
static EUROCurrencyImpl |
getCurrency()
Helper method to avoid to long code-lines. |
static MoneyBagImpl |
getMoneyBag()
Helper method to avoid to long code-lines. |
static CatalogImpl |
getVideoCatalog()
Helper method to avoid to long code-lines. |
static CountingStockImpl |
getVideoStock()
Helper method to avoid to long code-lines. |
void |
quit()
Overidden to avoid the annoying save-query, when quiting the application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String C_VIDEOS
Catalog
public static final String C_CURRENCY
Catalog
public static final String CC_VIDEOS
CountingStock
public static final String MB_MONEY
MoneyBag
public static final String FILENAME
public static final String CAPTION_AUTOMAT
VideoAutomat
public static final String MS_NEW
public static final String MSI_AUTOMAT
public static final String MSG_ACCESS
ActionCapability
, if it`s not granted.
public static final String MSI_DAY
Constructor Detail |
---|
public VideoShop()
Shop#setTheShop()
. Also initialize
the global Catalogs
and Stocks
and sets a Timer
.
Method Detail |
---|
protected MenuSheet createShopMenuSheet()
Shop`s MenuSheet
, containing the default one, a button to start
an automat and a button to switch the time further.sale.Shop#createShopMenuSheet()
public void quit()
sale.Shop#quit()
public static CatalogImpl getVideoCatalog()
Catalog
of videos.public static CountingStockImpl getVideoStock()
Stock
of videospublic static MoneyBagImpl getMoneyBag()
MoneyBag
containing the money of the shop.public static EUROCurrencyImpl getCurrency()
EUROCurrencyImpl
-instancepublic static void checkRentedVideos()
|
Videoautomat | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |