//This is the HEADER FILE templist.h. //This is the INTERFACE for the class TemperatureList. //Values of this type are lists of Fahrenheit temperatures. #ifndef TEMPLIST_H #define TEMPLIST_H #include const int MAX_LIST_SIZE = 50; class TemperatureList { public: TemperatureList( ); //Initializes the object to an empty list. void add_temperature(double temperature); //Precondition: The list is not full. //Postcondition: The temperature has been added to the list. int full( ) const; //Returns true if the list is full. friend ostream& operator <<(ostream& outs, const TemperatureList& the_object); //Overloads the << operator so it can be used to output values of //type Temperature List. Temperatures are output one per line. //Precondition: If outs is a file output stream, then outs //has already been connected to a file. private: double list[MAX_LIST_SIZE]; //of temperatures in Fahrenheit int size; //number of array positions filled }; #endif //TEMPLIST_H