1: // Created by Frank M. Carrano and Timothy M. Henry. 2: // Copyright (c) 2017 Pearson Education, Hoboken, New Jersey. 4: /** Listing C1-6. 5: @file ToyBox.cpp */ 7: #include "ToyBox.h" 9: template<class ItemType> 10: ToyBox<ItemType>::ToyBox() : boxColor(BLACK) 11: { 12: } // end default constructor 14: template<class ItemType> 15: ToyBox<ItemType>::ToyBox(const Color& theColor) : boxColor(theColor) 16: { 17: } // end constructor 19: template<class ItemType> 20: ToyBox<ItemType>::ToyBox(const ItemType& theItem, const Color& theColor) 21: : PlainBox<ItemType>(theItem), boxColor(theColor) 23: { 24: } // end constructor 26: template<class ItemType> 27: Color ToyBox<ItemType>::getColor() const 28: { 29: return boxColor; 30: } // end getColor