Beispiel #1
0
int
main(int argc, char* argv[])
{
	// Object Assembly
	cout << " * [Assembly Operations]" << endl;
	cout << " * Building deck...";
	Deck deck;
	cout << "done" << endl;
	cout << " * Building my card...";
	Card card (SPADES, TWO);
	cout << "done" << endl;
	cout << " * My Card is ";
	card.print();
	cout << endl;

	// Search operations
	cout << " * [Search Operations]" << endl;
	int index = 0;
	cout << " * Invoke deck.findBisect()...";
	index = deck.findBisect(card);
	cout << "done";
	cout << "; My Card found at index #" << index << endl;
	cout << " * Invoke card.findBisect()...";
	index = card.findBisect(deck);
	cout << "done";
	cout << "; My Card found at index #" << index << endl;
	cout << " * Invoke deck.find()...";
	index = deck.find(card);
	cout << "done";
	cout << "; My Card found at index #" << index << endl;
	cout << " * Invoke card.find()...";
	index = card.find(deck);
	cout << "done";
	cout << "; My Card found at index #" << index << endl;
	cout << endl;
	//deck.print();

	return 0;
}