20 std::vector<EntryInformation>
entries =
51 std::cout << std::endl;
52 std::cout <<
"Strategy Exercise" << std::endl;
63 std::cout <<
" Done." << std::endl;
static EntryInformation entries[]
List of individuals to play around with in the Strategy exercise.
Implementation of the Strategy_ShowEntries_Class classes used in the Strategy Pattern.
Declaration of the Strategy_SortEntries_ClassFactory class and implementation of the various Strategy...
Represents a way of displaying a list of EntryInformation objects in a particular order....
void ShowEntries(const std::vector< EntryInformation > &entries)
Display the specified entries in sorted order. The order of the sort was established when the Strateg...
Declaration of the Strategy_Exercise() function as used in the Strategy Pattern.
The namespace containing all Design Pattern Examples implemented in C++.
@ ByHeight
Sort numerically by height in ascending order.
@ ByAge
Sort numerically by age in ascending order.
@ ByName
Sort alphabetically name in ascending order.
void Strategy_Exercise()
Example of using the Strategy design pattern.
Represents an individual with a Name, Age, and Height.