You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.1 KiB
61 lines
2.1 KiB
// ************************************************************************** // |
|
// // |
|
// Account.class.cpp for GlobalBanksters United // |
|
// Created on : Thu Nov 20 19:43:15 1989 // |
|
// Last update : Wed Jan 04 14:54:06 1992 // |
|
// Made by : Brad "Buddy" McLane <bm@gbu.com> // |
|
// // |
|
// ************************************************************************** // |
|
|
|
// ************************************************************************** // |
|
// Account Class // |
|
// ************************************************************************** // |
|
class Account { |
|
|
|
|
|
public: |
|
|
|
typedef Account t; |
|
|
|
static int getNbAccounts( void ); |
|
static int getTotalAmount( void ); |
|
static int getNbDeposits( void ); |
|
static int getNbWithdrawals( void ); |
|
static void displayAccountsInfos( void ); |
|
|
|
Account( int initial_deposit ); |
|
~Account( void ); |
|
|
|
void makeDeposit( int deposit ); |
|
bool makeWithdrawal( int withdrawal ); |
|
int checkAmount( void ) const; |
|
void displayStatus( void ) const; |
|
|
|
|
|
private: |
|
|
|
static int _nbAccounts; |
|
static int _totalAmount; |
|
static int _totalNbDeposits; |
|
static int _totalNbWithdrawals; |
|
|
|
static void _displayTimestamp( void ); |
|
|
|
int _accountIndex; |
|
int _amount; |
|
int _nbDeposits; |
|
int _nbWithdrawals; |
|
|
|
Account( void ); |
|
|
|
}; |
|
|
|
|
|
|
|
// ************************************************************************** // |
|
// vim: set ts=4 sw=4 tw=80 noexpandtab: // |
|
// -*- indent-tabs-mode:t; -*- |
|
// -*- mode: c++-mode; -*- |
|
// -*- fill-column: 75; comment-column: 75; -*- |
|
// My boss is a dick // |
|
// ************************************************************************** //
|
|
|