导航:首页 > 源码编译 > 银行客户端源码

银行客户端源码

发布时间:2024-08-04 11:19:02

‘壹’ 姹傦细鐢↗AVA璇瑷缂栧啓镄勯摱琛屽剁畻娉旷殑婧愪唬镰

import java.util.*;

class ThreadTest {
static int type = 4, num = 10; //瀹氢箟璧勬簮鏁扮洰鍜岀嚎绋嬫暟鐩
static int[] resource = new int[type]; //绯荤粺璧勬簮镐绘暟
//static int[] Resource = new int[type]; //鍓链
static Random rand = new Random();
static Bank[] bank = new Bank[num]; //绾跨▼缁
Bank temp = new Bank();

public void init() {
//鍒濆嫔寲缁勪腑姣忎釜绾跨▼锛岄殢链哄~鍏呯郴缁熻祫婧愭绘暟
for(int i = 0; i < type; i++)
resource[i] = rand.nextInt(10) + 80;
System.out.print("Resource:");
for(int i = 0; i < type; i++)
System.out.print(" " + resource[i]);
System.out.println("");
for(int i = 0; i < bank.length; i++)
bank[i] = new Bank("#" + i);
}
public ThreadTest4() {
init();
}

class Bank extends Thread {
//阈惰屽剁畻娉曢伩鍏嶆婚挛
public int[]
max = new int[type], //镐诲叡闇姹傞噺
need = new int[type], //灏氶渶璧勬簮閲
allocation = new int[type]; //宸插垎閰嶉噺
private int[]
request = new int[type], //鐢宠疯祫婧愰噺
Resource = new int[type]; //璧勬簮鍓链
private boolean isFinish = false; //绾跨▼鏄钖﹀畬鎴
int[][] table = new int[bank.length][type*4]; //浜岀淮璧勬簮鍒嗛厤琛

private void init() {
// 闅忔満濉鍏呮诲叡銆佸皻闇銆佸凡鍒嗛厤閲
synchronized(resource) {
for(int i = 0; i < type; i++) {
max[i] = rand.nextInt(5) + 10;
need[i] = rand.nextInt(10);
allocation[i] = max[i] - need[i];
resource[i] -= allocation[i]; //浠庣郴缁熻祫婧愪腑鍑忓幓宸插垎閰岖殑
}
printer();
for(int i = 0; i < type; i++) {
if(resource[i] < 0) {
//鑻ュ嚭鐜板凡鍒嗛厤閲忚秴鍑虹郴缁熻祫婧愭绘暟镄勯敊璇鍒欓鍑
System.out.println("The summation of Threads' allocations is out of range!");
System.exit(1);
}
}
}
}

public Bank(String s) {
setName(s);
init();
start();
}
public Bank() {
//none
}

public void run() {
try {
sleep(rand.nextInt(2000));
}
catch(InterruptedException e) {
throw new RuntimeException(e);
}
while(true) {
//绋嫔簭娌℃湁瀹屾垚镞朵竴鐩翠笉鏂鐢宠疯祫婧
if(askFor() == false) {
try {
sleep(1000);
}
catch(InterruptedException e) {
throw new RuntimeException(e);
}
}
else
tryRequest();
if(noNeed() == true)
break;
}
//浼戠湢涓娈垫椂闂存ā𨰾熺▼搴忚繍琛
try {
sleep(1000);
}
catch(InterruptedException e) {
throw new RuntimeException(e);
}
System.out.println(getName() + " finish!");
synchronized(resource) {
//杩愯岀粨𨱒熼喷鏀惧崰链夎祫婧
for(int i = 0; i < type; i++) {
resource[i] += allocation[i];
need[i] = allocation[i] = max[i] = 0;
}
}
}

private void printer() {
//镓揿嵃褰揿墠璧勬簮淇℃伅
System.out.print(getName() + " Max:");
for(int i = 0; i < type; i++)
System.out.print(" " + max[i]);
System.out.print(" Allocation:");
for(int i = 0; i < type; i++)
System.out.print(" " + allocation[i]);
System.out.print(" Need:");
for(int i = 0; i < type; i++)
System.out.print(" " + need[i]);
System.out.print(" Available:");
for(int i = 0; i < type; i++)
System.out.print(" " + resource[i]);
System.out.println("");
}
private boolean askFor() {
//闅忔満浜х敓鐢宠疯祫婧愰噺骞舵娴嬫槸钖﹁秴镙
boolean canAsk = false;
for(int i = 0; i < type; i++) {
request[i] = rand.nextInt(20);
//阒叉㈢敌璇烽噺瓒呰繃镓闇閲
if(request[i] > need[i])
request[i] = need[i];
}
for(int i = 0; i < type; i++) //阒叉㈤殢链虹敌璇疯祫婧愬叏涓0
if(request[i] > 0)
canAsk = true;
synchronized(resource) {
//阌佷綇鍙渚涜祫婧愭镆ユ槸钖﹁秴镙
for(int i = 0; i < type; i++) {
if(request[i] > resource[i])
//濡傛灉鐢宠疯祫婧愯秴杩囧彲渚涜祫婧愬垯绛夊緟涓娈垫椂闂村悗閲嶆柊鐢宠
return false;
}
}
return canAsk;
}
private void tryRequest() {
//鍒涘缓鍓链灏濊瘯鍒嗛厤璇锋眰
synchronized(resource) {
for(int i = 0; i < type; i++)
//渚濈劧瑕侀槻姝㈣锋眰閲忚秴鍑鸿寖锲
if(request[i] > resource[i])
return;
for(int i = 0; i < type; i++) {
//澶嶅埗璧勬簮閲忓苟鍑忓幓闇姹傞噺鍒颁竴涓鍓链涓
Resource[i] = resource[i];
Resource[i] -= request[i];
}
System.out.print(getName() + " ask for:");
for(int i = 0; i < type; i++)
System.out.print(" " + request[i]);
System.out.println("");
if(checkSafe() == true) {
//濡傛灉妫镆ュ畨鍏ㄥ垯灏嗗坛链鍊艰祴缁栾祫婧愰噺骞朵慨鏀瑰崰链夐噺鍜岄渶姹傞噺
for(int i = 0; i < type; i++) {
resource[i] = Resource[i];
allocation[i] += request[i];
need[i] -= request[i];
}
System.out.println(getName() + " request succeed!");
}
else
System.out.println(getName() + " request fail!");
}
}
private boolean checkSafe() {
//阈惰屽剁畻娉曟镆ュ畨鍏ㄦ
synchronized(bank) {
//灏嗙嚎绋嬭祫婧愪俊鎭鏀惧叆浜岀淮璧勬簮鍒嗛厤琛ㄦ镆ュ畨鍏ㄦэ纴0~type鍙鐢ㄨ祫婧愶纺type~type*2镓闇璧勬簮锛弔ype*2~type*3鍗犳湁璧勬簮锛弔ype*3~-1鍙鐢+鍗犵敤璧勬簮
for(int i = 0; i < bank.length; i++) {
for(int j = type; j < type*2; j++) {
table[i][j] = bank[i].need[j%type];
}
for(int j = type*2; j < type*3; j++) {
table[i][j] = bank[i].allocation[j%type];
}
}
//鍐掓场鎺掑簭鎸夐渶姹傝祫婧愪粠灏忓埌澶ф帓
for(int i = 0; i < bank.length; i++) {
for(int j = i; j < bank.length-1; j++) {
sort(j, 4);
}
}
//杩涜屾ゆ椂鍒荤殑瀹夊叏镐ф镆
for(int i = 0; i < type; i++) {
table[0][i] = Resource[i];
table[0][i+type*3] = table[0][i] + table[0][i+type*2];
if(table[0][i+type*3] < table[1][i+type])
return false;
}
for(int j = 1; j < bank.length-1; j++) {
for(int k = 0; k < type; k++) {
table[j][k] = table[j-1][k+type*3];
table[j][k+type*3] = table[j][k] + table[j][k+type*2];
if(table[j][k+type*3] < table[j+1][k+type])
return false;
}
}
}
return true;
}
private void sort(int j, int k) {
//阃掑綊鍐掓场鎺掑簭
int tempNum;
if(table[j][k] > table[j+1][k]) {
for(int i = type; i < type*2; i++) {
tempNum = table[j][i];
table[j][i] = table[j+1][i];
table[j+1][i] = tempNum;
}
/*temp = bank[j];
bank[j] = bank[j+1];
bank[j+1] = temp;*/
}
else if(table[j][k] == table[j+1][k] && k < type*2) //姝よ祫婧愰噺鐩稿悓镞堕掑綊涓嬩竴涓璧勬簮閲忔帓搴忓苟涓旈槻姝㈣秴鍑鸿寖锲
sort(j, k+1);
}
private boolean noNeed() {
//鏄钖﹁缮闇瑕佽祫婧
boolean finish = true;
for(int i = 0; i < type; i++) {
if(need[i] != 0) {
finish = false;
break;
}
}
return finish;
}
}

public static void main(String[] args) {
ThreadTest t = new ThreadTest();
//钖庡彴绾跨▼锛岃惧畾绋嫔簭杩愯屽氶暱镞堕棿钖庤嚜锷ㄧ粨𨱒
new Timeout(30000, "---Stop!!!---");
}
}

‘贰’ 求一个JSP 网络银行或者ATM源代码

import java.util.Scanner;
import java.util.Date;
public class ATM {
public static void main (String[] args) {
System.out.println("您好,欢迎使用农业银行优惠卡!");
int a=123456;
int jine;
int flag=0,bianhao=1023;
int mima;
int anjian;
int ye=0;
int xianshi,dayin;
int year,month,date;
String zhanghao="6228480270673875612",zhuanzhanghao;
Scanner sc=new Scanner(System.in);
for(int i=1;i<=3;i++){
System.out.println("请输入密码:(6位数字)");
mima=sc.nextInt();
if(a==mima)
{
System.out.println ("密码正确请选择业务");
for(;;){
System.out.println ("取款\t~1~");
System.out.println ("转账\t~2~");
System.out.println ("存现\t~3~");
System.out.println ("更改密码~4~");
System.out.println ("查询余额~5~");
System.out.println ("取卡\t~0~");
anjian=sc.nextInt();
if(anjian==1)
{
if(ye<100)
{
System.out.println ("您的余额不足100元,请您及时存现");
break;
}
int qukuan;
for(;;)
{
for(;;)
{
System.out.println ("---------------取款功能--------------");
System.out.println ("请输入您要取款的份额:");
System.out.println ("\t100\t200\t500\t");
qukuan=sc.nextInt();
if(qukuan<=ye)
{
break;
}
else{
System.out.println ("余额不足,取消交易");
}

}if(qukuan==100||qukuan==200||qukuan==500)
{
break;
}
else
{
System.out.println ("您的输入有误请输入正百的数");
}

}
ye-=qukuan;
System.out.println ("交易正在处理~请稍候~z~z~z~z~z~z~z~~~~~~~");
System.out.println ("请您收好您的"+qukuan+"元"+"钞票----15秒钟自动收回");
System.out.println ("-----------------------------------------------------");
System.out.println ("是否显示余额?显示:1不显示:2");
xianshi=sc.nextInt();
if(xianshi==1)
{
System.out.println ("您的余额为"+ye+"元");
System.out.println ("--------------------------------");
System.out.println ("为了您和您家人的幸福,请节约用钱");
System.out.println ("--------------------------------");
}
System.out.println ("是否打印取款凭条?打印:1 不打印:2");
dayin=sc.nextInt();
Date dd=new Date();
if(dayin==1)
{
System.out.println ("-----------------------中国农业银行-------------------------");
System.out.println ("\t\t\t----------取款凭条-----------\t\t\t");
System.out.println ("帐号:"+zhanghao);
System.out.println ("取款份额:"+qukuan);
System.out.println ("余额:"+ye);
System.out.println ("日期:"+dd.toLocaleString());
System.out.println ("------------------------------------------------------------");
System.out.println ("\t\t\t机器编号:"+bianhao);
System.out.println ("------------------------------------------------------------");
}
int ji;
System.out.println ("是否继续业务:继续:1 取卡:2");
ji=sc.nextInt();
if(ji==1)
{
continue;
}
if(ji==2)
{
System.out.println ("请收回您的磁卡,下次再见");
break;
}
}
if(anjian==2)
{
int zhuanzhang;
for(;;)
{
System.out.println ("---------------转账功能----------------");
System.out.println ("请输入您要转账的份额:");
zhuanzhang=sc.nextInt();

if(zhuanzhang%100==0)
{
if(ye-zhuanzhang>=00)
{
break;
}
else
{
System.out.println ("余额不足,请重新输入");
}

}
else
{
System.out.println ("您的输入无效");
}
}
for(;;)
{
System.out.println ("请输入您要转账的账号:(19位)");
zhuanzhanghao=sc.next();
if(zhuanzhanghao.length()==19)
{
break;
}
else
{
System.out.println ("帐号输入有误,请重新输入");
}
}
System.out.println ("是否继续转账?继续:1 取消:2");
int anjian2;
anjian2=sc.nextInt();
if(anjian2==1)
{
ye-=zhuanzhang;
System.out.println ("正在转账-请稍候~~~~");
System.out.println ("转帐成功");
}
System.out.println ("-----------");
System.out.println ("是否显示余额?显示:1不显示:2");
xianshi=sc.nextInt();
if(xianshi==1)
{
System.out.println ("您的余额为"+ye+"元");
System.out.println ("--------------------------------");
System.out.println ("为了您和您家人的幸福,请节约用钱");
System.out.println ("--------------------------------");
}
System.out.println ("是否打印取款凭条?打印:1 不打印:2");
dayin=sc.nextInt();
Date dd=new Date();
if(dayin==1)
{
System.out.println ("-----------------------中国农业银行-------------------------");
System.out.println ("\t\t\t----------转账凭条-----------\t\t\t");
System.out.println ("帐号:"+zhanghao);
System.out.println ("转账帐号:"+zhuanzhanghao);
System.out.println ("转账份额:"+zhuanzhang);
System.out.println ("余额:"+ye);
System.out.println ("日期:"+dd.toLocaleString());
System.out.println ("------------------------------------------------------------");
System.out.println ("\t\t\t机器编号:"+bianhao);
System.out.println ("------------------------------------------------------------");
}
int ji;
System.out.println ("是否继续业务:继续:1 取卡:2");
ji=sc.nextInt();
if(ji==1)
{
continue;
}
else
{
System.out.println ("请收回您的磁卡,下次再见");
break;
}
}
if(anjian==3)
{
for(;;)
{
System.out.println ("---------------存现功能---------------");
System.out.println ("请输入您要存款的金额");

jine=sc.nextInt();
if(jine%100==0)
{
break;
}
else
{
System.out.println ("您的输入有误,请输入正百的输入");
}
}
System.out.println ("请将您的钞票放入到机器开起的口中(注意:平放!!)");
System.out.println ("正在清点~~~~~z~~~~~z~~~~~z~~~~~z~~~~z~~~~~~z~~~~");
System.out.println ("输入与放入一至;存现成功");
ye+=jine;
System.out.println ("是否显示余额?显示:1不显示:2");
xianshi=sc.nextInt();
if(xianshi==1)
{
System.out.println ("您的余额为"+ye+"元");
System.out.println ("--------------------------------");
System.out.println ("为了您和您家人的幸福,请节约用钱");
System.out.println ("--------------------------------");
}
System.out.println ("是否打印取款凭条?打印:1 不打印:2");
dayin=sc.nextInt();
Date dd=new Date();
if(dayin==1)
{
System.out.println ("-----------------------中国农业银行-------------------------");
System.out.println ("\t\t\t----------存现凭条-----------\t\t\t");
System.out.println ("帐号:"+zhanghao);
System.out.println ("存现份额:"+jine);
System.out.println ("余额:"+ye);
System.out.println ("日期:"+dd.toLocaleString());
System.out.println ("------------------------------------------------------------");
System.out.println ("\t\t\t机器编号:"+bianhao);
System.out.println ("------------------------------------------------------------");
}
int ji;
System.out.println ("是否继续业务:继续:1 取卡:2");
ji=sc.nextInt();
if(ji==1)
{
continue;
}
else
{
System.out.println ("请收回您的磁卡,下次再见");
break;
}
}
if(anjian==4)
{
int ym,xm,qxm,flag1=0;
for(int j=0;j<3;j++)
{
System.out.println ("------------------改密功能----------------------");
System.out.println ("请输入原始密码:");
ym=sc.nextInt();
if(ym==a)
{
System.out.println ("密码正确");
for(;;)
{
System.out.println ("请输入新密码:");
xm=sc.nextInt();
System.out.println ("请再次输入新密码");
qxm=sc.nextInt();
if(xm==qxm)
{
a=xm;
System.out.println ("密码更改成功,请您牢记您的密码");
break;
}
else
{
System.out.println ("两次输入不一致,请重新输入");
}
}
flag1=1;
break;
}
else
{
System.out.println ("密码错误");
}
}
if(flag1==0)
{
System.out.println ("三次输入错误,密码更改失败");
}
int ji;
System.out.println ("是否继续业务:继续:1 取卡:2");
ji=sc.nextInt();
if(ji==1)
{
continue;
}
else
{
System.out.println ("请收回您的磁卡,下次再见");
break;
}
}
if(anjian==5)
{
System.out.println ("------------查询功能-------------");
System.out.println ("您的贵卡余额为:"+ye+"元");
System.out.println ("---------------------------------");
int ji;
System.out.println ("是否继续业务:继续:1 取卡:2");
ji=sc.nextInt();
if(ji==1)
{
continue;
}
else
{
System.out.println ("请收回您的磁卡,下次再见");
break;
}
}
if(anjian==0)
{
System.out.println ("请收回您的磁卡,下次再见");
break;
}

}flag=1;
break;

}

}
if(flag==0)
{
System.out.println ("密码输入超过三次,ATM机吞卡");
}

}
}

‘叁’ 农业掌上银行的软件源代码

农业银行Swift码 Shanghai Branch ABOCCNBJ010 Beijing Branch ABOCCNBJ090 Tianjin Branch ABOCCNBJ020 Shanxi Branch 山西 ABOCCNBJ040 Neimeng Branch ABOCCNBJ050 Liaoning Branch ABOCCNBJ060 Heilongjiang Branch ABOCCNBJ080 Jiangsu Branch ABOCCNBJ100 Zhejiang Branch ABOCCNBJ110 Anhui Branch ABOCCNBJ120 Fujian Branch ABOCCNBJ130 Jiangxi Branch ABOCCNBJ140 Shandong Branch ABOCCNBJ150 Hubei Branch ABOCCNBJ170 Hunan Branch ABOCCNBJ180 Guangdong Branch ABOCCNBJ190 Guangxi Branch ABOCCNBJ200 Hainan Branch ABOCCNBJ210 Sichuan Branch ABOCCNBJ220 Yunnan Branch ABOCCNBJ240 Shanxi Branch 陕西 ABOCCNBJ260 Gansu Branch ABOCCNBJ270 Xinjiang Branch ABOCCNBJ300 Xinjiang Nongken Branch ABOCCNBJ301 Chongqing Branch ABOCCNBJ310 Dalian Branch ABOCCNBJ340 Qing Branch ABOCCNBJ380 Ningbo Branch ABOCCNBJ390 Shenzhen Branch ABOCCNBJ410 Henan Branch ABOCCNBJ160

‘肆’ 用java来编写一个银行类账户和信用卡类的账户,信用卡类账户继承银行账户,求源码

public class Account {

protected String accId;
protected String name;
protected double money;

public Account (String accId,String name){
this(accId,name,0);
}

public Account (String accId,String name,double money){
this.accId = accId;
this.name = name;
this.money = money;
}

public void saveMoney(double money){
if(money <= 0){
System.out.println("存款金额必须大于0");
}
this.money += money;
System.out.println("存款成功");
}

public double getMoney(double money){
if(money <= 0){
System.out.println("取款金额必须大于0");
return 0;
}
if(this.money <= money){
System.out.println("余额不足,无法取款");
return 0;
}
this.money -= money;
System.out.println("取款成功");
return money;
}

public double getBalance(){
return this.money;
}

protected double getOverdraft(){
return 0;
}

// 实现了equals方法,list比较时才能正确
@Override
public boolean equals(Object obj) {
if(obj == null){
return false;
}
if(this == obj){
return true;
}
if(obj instanceof Account){
return this.accId.equals(((Account)obj).accId);
}
return false;
}

@Override
public String toString() {
return "账户=" + accId + ",名字=" + name + ",余额=" + money;
}

}
public class Bank {

// Account实现了equals方法,list查找时才能正确
private List<Account> usersAccounts;

public Bank() {
usersAccounts = new ArrayList<Account>();
}

public void addAccount(Account account) {
if (usersAccounts.contains(account)) {
System.out.println("添加失败,不能添加同样的账户");
return;
}
usersAccounts.add(account);
}

public boolean delAccount(Account account) {
return usersAccounts.remove(account);
}

public boolean delAccount(String accId) {
return delAccount(new Account(accId, null));
}

public boolean existAccount(Account account) {
return usersAccounts.contains(account);
}

public boolean existAccount(String accId) {
return existAccount(new Account(accId, null));
}

public Account getAccount(String accId){
return usersAccounts.get(usersAccounts.indexOf(new Account(accId, null)));
}

public double getAllMoney() {
// 不考虑是否溢出,只是把所有用户余额相加
double result = 0;
for (Account account : usersAccounts) {
result += account.getBalance();
}
return result;
}

public double getAllOverdraft() {
// 不考虑是否溢出
double result = 0;
for (Account account : usersAccounts) {
result += account.getOverdraft();
}
return result;
}

public int getAccountNum() {
return usersAccounts.size();
}

public int getCreditAccountNum() {
int num = 0;
for (Account account : usersAccounts) {
// instanceof 性能没有简单的方法快。
if (account instanceof CreditAccount) {
num++;
}
}
return num;
}

public int getSavingAccountNum() {
int num = 0;
for (Account account : usersAccounts) {
if (account instanceof SavingAccount) {
num++;
}
}
return num;
}

public List<Account> getAllAccount() {
return usersAccounts;
}
}
public class CreditAccount extends Account{

private double overdraft;

public CreditAccount(String accId,String name){
super(accId, name);
this.overdraft = 1000;
}

public CreditAccount(String accId,String name,double money){
this(accId, name,money,1000);
}

public CreditAccount(String accId,String name,double money,double overdraft){
super(accId, name,money);
this.overdraft = overdraft;
}

@Override
public double getMoney(double money) {
if(money <= 0){
System.out.println("取款金额必须大于0");
return 0;
}
if(this.money + overdraft <= money){
System.out.println("余额不足,无法取款");
return 0;
}
this.money -= money;
System.out.println("取款成功");
return money;
}

@Override
public double getOverdraft(){
return overdraft;
}

@Override
public String toString() {
return "账户=" + accId + ",名字=" + name + ",余额=" + money + ",透支=" + overdraft;
}
}
public class SavingAccount extends Account {

public SavingAccount(String accId, String name) {
super(accId, name);
}

public SavingAccount(String accId, String name, double money) {
super(accId, name, money);
}

@Override
public double getMoney(double money) {
return super.getMoney(money);
}

@Override
public double getOverdraft() {
return super.getOverdraft();
}

}
public class Test {

private static Bank bank = new Bank();
public static void main(String[] args) {
Test.genAccount();
// 开户
Account a1 = new CreditAccount("1", "1", 200, 2000);
Account a2 = new SavingAccount("2", "2", 300);
Account a3 = new SavingAccount("3", "3", 400);
Account a4 = new CreditAccount("4", "4", 500, 2000);
Account a5 = new CreditAccount("4", "5", 600, 2000); // 帐号4重
bank.addAccount(a1);
bank.addAccount(a2);
bank.addAccount(a3);
bank.addAccount(a4);
bank.addAccount(a5);
showNowAccount();
// 销户
bank.delAccount("1");
bank.delAccount("2");
showNowAccount();
// 存款
if(bank.existAccount("3")){
Account acc = bank.getAccount("3");
acc.saveMoney(100);
}
showNowAccount();
// 取款
if(bank.existAccount("3")){
Account acc = bank.getAccount("3");
System.out.println("余额=" + acc.getBalance());
acc.getMoney(100);
System.out.println("余额=" + acc.getBalance());
acc.getMoney(1000);
System.out.println("余额=" + acc.getBalance());
}
if(bank.existAccount("4")){
Account acc = bank.getAccount("4");
System.out.println("余额=" + acc.getBalance());
acc.getMoney(100);
System.out.println("余额=" + acc.getBalance());
acc.getMoney(1000);
System.out.println("余额=" + acc.getBalance());
acc.getMoney(10000);
System.out.println("余额=" + acc.getBalance());
}
System.out.println(bank.getAccountNum());
System.out.println(bank.getAllMoney());
System.out.println(bank.getAllOverdraft());
System.out.println(bank.getCreditAccountNum());
System.out.println(bank.getSavingAccountNum());
}

public static void genAccount(){
String s = "1000 0000 0000 000";
Account a = null;
for(int i = 1; i < 11; i ++){
if((i & 2) == 0){
a = new CreditAccount(s + String.valueOf(i), "账户" + String.valueOf(i));
} else {
a = new SavingAccount(s + String.valueOf(i), "账户" + String.valueOf(i));
}
bank.addAccount(a);
}
}

public static void showNowAccount(){
for(Account account : bank.getAllAccount()){
System.out.println(account);
}
}
}

阅读全文

与银行客户端源码相关的资料

热点内容
梦的pdf微盘 浏览:184
材料结构分析pdf 浏览:793
程序员预研的项目 浏览:344
新华保险服务器登录不上怎么回事 浏览:395
气温高时汽车空调压缩机振动 浏览:561
分配器python 浏览:224
outlook服务器怎么查询 浏览:400
python预测疫情代码 浏览:982
普通化学原理pdf 浏览:908
java的圣经 浏览:41
python遍历两个数组 浏览:396
手游搭建云服务器 浏览:401
视易锋云服务器启动黑屏 浏览:139
python怎么获取网页a标签内容 浏览:982
app更新后老的安装包去哪里了 浏览:199
集合运算法则差集 浏览:310
x2pdf 浏览:271
python源码cs 浏览:101
数控机床自动编程软件 浏览:738
方舟的服务器号是什么 浏览:111