zoukankan      html  css  js  c++  java
  • 每日总结

    今天进行教材中综合实例的练习,要求实现简单的ATM机工作功能。首先对系统的功能进行分析,

    然后确定要使用的流程结构及函数。

    今天完成了部分要求,明天继续。

    public class AccountManager {
    Account ab=new Account();
    Account[] ai=new Account[5];
    public void zhaohaoboshuodefangfa() {
    ai[0]=new Account("20193937","李兴宇","111222",0);
    ai[1]=new Account("20193938","张三","222333",0);
    ai[2]=new Account("20193939","李四","333444",0);
    ai[3]=new Account("20193940","王五","444555",0);
    ai[4]=new Account("20193941","刘一","555666",0);
    }
    public void zhanghao() {
    //Account at1=new Account("null","null","null",)
    while(true) {
    for(int i=0;i<40;i++) {
    System.out.print("*");
    }
    System.out.println();
    System.out.println(" 欢迎使用中国工商银行自动柜员系统 ");
    for(int i=0;i<40;i++) {
    System.out.print("*");
    }
    System.out.println();
    Scanner sc=new Scanner(System.in);
    System.out.println("请输入您的帐号:");
    String id=sc.nextLine();
    if(id.length()!=8) {
    System.out.println("该卡不是工行卡");
    continue;
    }
    int i;
    int index=-1;
    for(i=0;i<ai.length;i++) {
    if(ai[i].getAccountID().equals(id)) {
    index=i;
    ab=ai[index];
    }
    }
    if(index==-1&&id.length()==8) {
    System.out.println("该账号不存在");
    }if(index!=-1&&id.length()==8) {
    AccountManager acc=new AccountManager();
    acc.mima();
    }
    }
    }

  • 相关阅读:
    深入理解系统调用
    基于mykernel 2.0编写一个操作系统内核
    交互式多媒体图书平台的设计与实现
    Ubuntu下VSCode调试环境搭建指南-C语言篇
    码农的自我修养之必备技能 学习笔记
    工程化编程实战callback接口学习笔记
    CentOS7.4网络配置
    R-CNN
    CUDA整理
    CUDA by Example 第四章 julia集
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14173944.html
Copyright © 2011-2022 走看看