銀行儲蓄系統

2021-07-03 21:37:04 字數 3310 閱讀 5713

**

main.cpp

/***************************

**檔名稱:main.cpp

*檔案標識:無

*內容摘要:進入程式系統

*其他說明:無

*當前版本:v1.0

*作 者:馬明城

*完成日期:2015.7.18

****************************/

#include #include "bank.h"

using namespace std;

/*主函式:*/

int main()

return 0;

}

bank.h

/***************************

**檔名稱:bank.h

*檔案標識:無

*內容摘要:引用系統所需要的類

*其他說明:無

*當前版本:v1.0

*作 者:馬明城

*完成日期:2015.7.18

****************************/

#ifndef bank_h_included

#define bank_h_included

#include using namespace std;

const int upnum=2000; //系統最多容納的使用者數

class bank;

class user

;class bank

;int pass(); //業務員登入

int chooseinmenu(); //顯示選單並由業務員選擇

int inputpassword(); //返回鍵盤輸入的密碼

#endif // bank_h_included

bank.cpp

/***************************

**檔名稱:bank.cpp

*檔案標識:無

*內容摘要:定義bank類

*其他說明:無

*當前版本:v1.0

*作 者:馬明城

*完成日期:2015.7.18

****************************/

#include #include #include #include "bank.h"

#include using namespace std;

/***************************

*功能描述:用建構函式讀取檔案中的資訊

*輸入引數:

*輸出引數:

*返 回 值:

*其他說明:

****************************/

bank::bank()

n = i; //用靜態資料成員

infile.close();

}/***************************

*功能描述:用析構函式儲存檔案中的資訊

*輸入引數:

*輸出引數:

*返 回 值:

*其他說明:

****************************/

bank::~bank()

else

else if (users[mid].account>id)

high=mid-1;

else

low=mid+1;

}if (index<0)

cout<

/***************************

**檔名稱:user.cpp

*檔案標識:無

*內容摘要:定義user類

*其他說明:無

*當前版本:v1.0

*作 者:馬明城

*完成日期:2015.7.18

****************************/

#include #include "bank.h"

using namespace std;

/***************************

*功能描述:初始化

*輸入引數:

*輸出引數:

*返 回 值:

*其他說明:

****************************/

void user::setuser(int acc, string nam, string in,string cn,string add,int pw, double bal,int sta)

/***************************

*功能描述:顯示使用者姓名

*輸入引數:

*輸出引數:

*返 回 值:

*其他說明:

****************************/

void user::showname()

spass[i]='\0';

fflush(stdin);

cout<0)

cout

if(i>=0 && i<=9)

break;

else

cout<

執行結果

銀行儲蓄系統

問題及 檔名稱 bank.cpp 作 者 李楠 完成日期 2015年2月27日 版 本 號 v1.0 問題描述 銀行儲蓄系統 輸入描述 略 程式輸出 略 include include include putch的標頭檔案 include system的標頭檔案 define mnum 2000 銀...

銀行儲蓄系統

const int upnum 2000 系統最多容納的使用者數 class user class bank int pass 業務員登入 int chooseinmenu 顯示選單並由業務員選擇 int inputpassword 返回鍵盤輸入的密碼 bool judgeday int,int,i...

銀行儲蓄系統

檔名稱 bank.h 檔案標識 無 內容摘要 該 用於獲取滿足字尾要求的第乙個檔案 其他說明 無 當前版本 v1.0 作 者 李明宇 完成日期 2015年7月16日 修改記錄 修改日期 無 版本號 v1.0 修改人 李明宇 修改內容 ifndef bank h included define ban...