Adding the start of ex02
This commit is contained in:
parent
8a95c7d3cb
commit
26f7e39833
6 changed files with 358 additions and 0 deletions
69
cpp00/ex02/Account.hpp
Normal file
69
cpp00/ex02/Account.hpp
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
// ************************************************************************** //
|
||||
// //
|
||||
// Account.hpp 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> //
|
||||
// //
|
||||
// ************************************************************************** //
|
||||
|
||||
|
||||
#pragma once
|
||||
#ifndef __ACCOUNT_H__
|
||||
#define __ACCOUNT_H__
|
||||
|
||||
// ************************************************************************** //
|
||||
// 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; -*-
|
||||
// ************************************************************************** //
|
||||
|
||||
|
||||
#endif /* __ACCOUNT_H__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue