Check Class Reference

#include <check.h>

List of all members.

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)


Detailed Description

A class for storing information about a check, which consists of a date, amount, and payee.

Author:
Mark Maloof (maloof@cs)
Version:
1.0, 07/13/10

Constructor & Destructor Documentation

Check::Check (  ) 

Default constructor. Sets amount to the default value of zero. String and DateTime objects keep their default values.


Member Function Documentation

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.

Parameters:
amount the specified value of this check

double Check::getAmount (  )  const

Returns the amount of this check.

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.

Parameters:
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.

Parameters:
out the output stream for writing


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const Check e 
) [friend]

Inserts a Check object in the internal format into the output stream, and returns the modified output stream.

Parameters:
out the output stream for insertion
check the Check for insertion
Returns:
the modified output stream

istream& operator>> ( istream &  in,
Check e 
) [friend]

Extracts a Check from the input stream, and returns the modified input stream.

Parameters:
in the input stream for extraction
check the Check for storing the extracted information
Returns:
the modified input stream


Member Data Documentation

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


The documentation for this class was generated from the following files:

Generated on Wed Jul 21 13:30:09 2010 by  doxygen 1.5.5