#include <check.h>
Public Member Functions | |
Check () | |
void | setAmount (double amount) |
double | getAmount () const |
void | input (istream &in) |
void | output (ostream &out) const |
Private Attributes | |
Date | date |
double | amount |
string | payee |
Friends | |
ostream & | operator<< (ostream &out, const Check &e) |
istream & | operator>> (istream &in, Check &e) |
Check::Check | ( | ) |
Default constructor. Sets amount to the default value of zero. String and DateTime objects keep their default values.
void Check::setAmount | ( | double | amount | ) |
Sets the amount of this check, which must be greater than or equal to zero. Fails silently if the specified amount is out of range.
amount | the specified value of this check |
double Check::getAmount | ( | ) | const |
Returns the amount of this check.
void Check::input | ( | istream & | in | ) |
Inputs a Check object from the input stream. The format of a check consists of its date, value, and payee, which can contain spaces but is terminated by the end of the line.
in | the input stream for reading |
void Check::output | ( | ostream & | out | ) | const |
Writes this Check object in the internal format followed by an end-of-line character to the output stream.
out | the output stream for writing |
ostream& operator<< | ( | ostream & | out, | |
const Check & | e | |||
) | [friend] |
istream& operator>> | ( | istream & | in, | |
Check & | e | |||
) | [friend] |
Date Check::date [private] |
the date the check
double Check::amount [private] |
the amount of the check
string Check::payee [private] |
the payee of the check