Homework 22
Write a class that models a list of temperature objects (i.e., objects of the
temperatureRecord class from homework 20). Your class should include the following
member functions:
- a default constructor that models a list with a maximum capacity of 10
- a copy constructor with one parameter: an object of this class
- a function (named length) that returns the number of records in the list
- a function (named capacity) that returns the maximum capacity of the
list
- a function (named append) with two parameters: a low temperature and a
high temperature
- a function (named setLowAt) with two parameters: a new low temperature
and a position in the list
- a function (named setHighAt) with two parameters: a new high temperature
and a position in the list
- a function (named getLowAt) with one parameter: a position in the list
- a function (named getHighAt) with one parameter: a position in the list
- a function(named getMinLow) that returns the minimum low temperature
- a function(named getMinHigh) that returns the minimum high temperature
- a function(named getMaxLow) that returns the maximum low temperature
- a function(named getMaxHigh) that returns the maximum high temperature
- a function(named getAvgLow) that returns the average low temperature
- a function(named getAvgHigh) that returns the average high temperature
- a function (named clearAll) that clears the list of all of its contents
In
Hmwk22.cpp, I've written some code to get you started.
Be sure to read each function header carefully to make sure you understand how
the function is supposed to behave.