//This is the IMPLEMENTATION FILE: templist.cxx. //(Your system may require some suffix other than .cxx). //This is the IMPLEMENTATION of the class TemperatureList. //The interface for the class TemperatureList is in the file templist.h. #include #include #include "templist.h" TemperatureList::TemperatureList( ) { size = 0; } //Uses iostream.h and stdlib.h: void TemperatureList::add_temperature(double temperature) { if ( full( ) ) { cout << "Error: adding to a full list.\n"; exit(1); } else { list[size] = temperature; size = size + 1; } } int TemperatureList::full( ) const { return (size == MAX_LIST_SIZE); } //Uses iostream.h: ostream& operator <<(ostream& outs, const TemperatureList& the_object) { for (int i = 0; i < the_object.size; i++) outs << the_object.list[i] << " F\n"; return outs; }