void PriceManager::initialise()
{
        std::cout << "\n\nPriceManager Initilising store prices ....\n";

        addPrice("A1", 1, 1.25);
        addPrice("A1", 3, 3);
       	addPrice("3-Q", 1, 4.25);
       	addPrice("45K11", 1, 1);
	addPrice("45K11" , 6, 5);
        addPrice("X1", 1, 0.75);

        std::cout << "\n\nInitilisation finished with " << prices.size() << " prices\n";
}
예제 #2
0
PriceManager::PriceManager()
{
	enum PriceManagerFunction
	{
		CHECK_N_DELETE_PRICE = 1,
		ADD_PRICE_INFO,
	};

	for (;;)
	{
		system("cls");
		cout <<
			"극장 관리 시스템\n"
			" > 가격 정보 관리\n\n"

			"1. 가격 정보 확인/삭제\n"
			"2. 가격 정보 추가\n"
			"0. 종료\n\n"

			"선택: ";
		
		int32_t function = 0;
		switch (inputPositiveInteger(function))
		{
		case FUNCTION_CANCEL:
			return;
		case FUNCTION_SUCCESS:
			switch (function)
			{
			case CHECK_N_DELETE_PRICE:
				checkAndDeletePrice();
				continue;
			case ADD_PRICE_INFO:
				addPrice();
				continue;
			}
		case FUNCTION_ERROR:
			cout << "\n잘못된 입력입니다.\n";
			system("pause");
		}
	}
}