void ShowShopCase(unsigned int shopIndex) { retailNetwork[shopIndex].getShopCase(shopCase); printf("\nList of products from the shop case \n\n"); for (productCounter = 0; productCounter < retailNetwork[shopIndex].getProductsAmount(); productCounter++) { Product currectProduct = shopCase[productCounter]; currectProduct.getProductName(productName); printf("\nProduct%d: ", productCounter + 1); printf(" Name: %s\n", productName); printf("\t Price: %4.2f\n", currectProduct.getProductPrice()); printf("\t Amount: %d\n", currectProduct.getProductAmount()); } }
void MenuSupport::showProdutcsForStoreIndex(StoreCountType index) const { if (_shoppingStores->getStoreCount() <= index) return; Store* store = _shoppingStores->getStoreAtIndex(index); printf(" %s:\n", store->getStoreName()); ProductCountInStoreType productCount = store->getProductCount(); if (0 == productCount) printf(kNoProductsStringMessage); for (ProductCountInStoreType i = 0; i < productCount; i++) { Product* product = store->getProductAtIndex(i); printf(kProductStringFormatMessage, i + 1, product->getProductName(), product->getProductPrice(), product->getProductAmount()); } }