Source of ListingC1-02.cpp


  1: //  Created by Frank M. Carrano and Timothy M. Henry.
  2: //  Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.

  4: /** Listing C1-2
  5:     @file PlainBox.cpp */
  6:     
  7: #include "PlainBox.h"

  9: PlainBox::PlainBox()
 10: {
 11: }  // end default constructor

 13: PlainBox::PlainBox(const ItemType& theItem)
 14: {
 15:    item = theItem;
 16: }  // end constructor

 18: void PlainBox::setItem(const ItemType& theItem)
 19: {
 20:    item = theItem;
 21: }  // end setItem

 23: ItemType PlainBox::getItem() const
 24: {
 25:    return item;
 26: }  // end getItem