// File: Smoothie.cpp // // See Lab 5 description for documentation. // #include #include #include "Smoothie.h" using namespace std ; // Default constructor: empty glass // Smoothie::Smoothie() { ingredients = "" ; amount = 0 ; } // Alternate constructors // Smoothie::Smoothie(string fruit, unsigned int ounces) { ingredients = fruit ; amount = ounces ; if (amount > GLASS_LIMIT) { cerr << "Smoothie overflow!\n" ; amount = GLASS_LIMIT ; } } // Returns a string that describes the amount and // ingredients of the current drink. // string Smoothie::Describe() const { ostringstream oss ; oss << amount << "oz " << ingredients << " smoothie " ; return oss.str() ; }