Account( pLL , accNo )
{ noWithdrawals = 0 ; }
/* Функции транзакций */
virtual bool withdrawal( double amount ) ;
virtual char* type( ) { return "Сберегательный" ; }
protected :
int noWithdrawals ;
} ;
/* withdrawal — перегрузка Account::withdrawal( ) */
bool Savings::withdrawal( double amount )
{
if ( ++noWithdrawals > 1 )
{
balance -= 5.00 ;
}
return Account::withdrawal( amount ) ;
}
/* Прототипы функций */
unsigned getAccntNo( ) ;
void process( Account* pAccount ) ;
void getAccounts( AccountLinkedList* pLinkedList ) ;
void displayResults( AccountLinkedList* pLinkedList ) ;
/* main — собирает и выводит данные */
int main( int argcs , char* pArgs[ ] )
{
setlocale ( LC_ALL , ".1251" ) ; /* печать кириллицы */
/* Создание связанного списка */
AccountLinkedList* pLinkedList = new AccountLinkedList( ) ;
/* Чтение пользовательского ввода */
getAccounts( pLinkedList ) ;