Budget5
 All Classes Files Functions Variables Typedefs
main.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>

Classes

class  Account
 an abstract bank account. More...
 
class  Checking
 the unique properties of a checking account. More...
 
class  Savings
 a Savings account More...
 

Typedefs

typedef AccountAccountPtr
 pointer to an Account More...
 

Functions

unsigned getAccntNo ()
 getAccntNo - return the account number to create account More...
 
void process (AccountPtr pAccount)
 process(Account) - input the data for an account More...
 
void getAccounts (list< AccountPtr > &accList)
 getAccounts - inputs accounts from the keyboard More...
 
void displayResults (list< AccountPtr > &accntList)
 displayResults - display the accounts found in the Account link list More...
 
int main (int argcs, char *pArgs[])
 

Typedef Documentation

typedef Account* AccountPtr

pointer to an Account

Function Documentation

void displayResults ( list< AccountPtr > &  accntList)

displayResults - display the accounts found in the Account link list

Parameters
accntListlist<AccountPtr>& the list of account
Returns
void
unsigned getAccntNo ( )

getAccntNo - return the account number to create account

Returns
unsigned the account number entered by the user
void getAccounts ( list< AccountPtr > &  accList)

getAccounts - inputs accounts from the keyboard

This function reads input from the keyboard. For every S or C entered, the function creates a new Savings or Checking account object and adds it to the account list. An X terminates the entry. Any other input is assumed to be a deposit (numbers greater than 0) or a withdrawal (numbers less than 0).

Parameters
accListlist<AccountPtr>& the list of account objects created by getAccounts()
Returns
void
int main ( int  argcs,
char *  pArgs[] 
)
void process ( AccountPtr  pAccount)

process(Account) - input the data for an account

Parameters
pAccountAccountPtr an account to process
Returns
void