class BoxInterface
1: // Created by Frank M. Carrano and Timothy M. Henry.
2: // Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.
4: /** Listing C1-9.
5: @file BoxInterface.h */
6:
7: #ifndef BOX_INTERFACE_
8: #define BOX_INTERFACE_
10: template <class ItemType>
11: class BoxInterface
12: {
13: public:
14: virtual void setItem(const ItemType& theItem) = 0;
15: virtual ItemType getItem() const = 0;
16: virtual ~BoxInterface() {} // C++ Interlude 2 explains virtual destructors
17: }; // end BoxInterface
18: #endif