#include <checkbook.h>
Public Member Functions | |
| Checkbook () | |
| void | input (string filename) |
| void | input (istream &in) |
| void | output (string filename) |
| void | output (ostream &out=cout) |
| double | total () const |
Private Attributes | |
| vector< Check > | checks |
| Checkbook::Checkbook | ( | ) |
Default constructor.
| void Checkbook::input | ( | string | filename | ) |
Reads checks from the specified file name, and stores them in the vector checks. Checks if the file opens properly, and prints an error message to cout if an error occurs.
| filename | the name of the file containing the checks |
| void Checkbook::input | ( | istream & | in | ) |
Inputs the checks from the input stream, and stores them in the vector checks.
| in | the input stream name containing the checks |
| void Checkbook::output | ( | string | filename | ) |
Outputs the checks of this Checkbook to the specified file name.
| filename | the name of the file for writing |
| void Checkbook::output | ( | ostream & | out = cout |
) |
Outputs the checks of this Checkbook to the specified output stream.
| out | the output stream for writing |
| double Checkbook::total | ( | ) | const |
Returns the total amount of the checks in this Checkbook.
vector<Check> Checkbook::checks [private] |
the checks of this checkbook
1.5.5