#include "glass_2.h" // // Implementation of Member Functions // Glass::Glass(int the_volume) { volume = the_volume; filled = 0; } Glass::~Glass() {} int Glass::fill(int quantity) { int free = volume - filled; if (quantity > free) { filled = volume; return free; }else{ filled += quantity; return quantity; } } int Glass::drink(int quantity) { int to_drink; if (quantity > filled) { filled = 0; return to_drink; }else{ filled -= quantity; return quantity; } } int Glass::empty() { int to_spill; filled = 0; return to_spill; } int Glass::content() { return filled; }