银行交易系统 Control

    xiaoxiao2026-04-08  2

    package jdbc.eduask.banksystem;

    import java.sql.Connection; import java.util.Scanner;

    public class Control {

    static Connection c = null; public static void main(String[] args)throws Exception { //获取数据库连接 c=MyJdbcTools.getConnection(); while(true){ System.out.println("***************欢迎进入智能化一卡通银行系统***************"); System.out.println("请输入你需要选择的业务"); System.out.println("1 用户开户 2 存款取款 3 转账 4 结算利息 5 修改密码 6 挂失"); Scanner choice1Input = new Scanner(System.in); int userChoice = choice1Input.nextInt(); // 开户功能; if (userChoice == 1) { BankSystemFunction.openAnAccount(c); } // 存款功能; if (userChoice == 2) { BankSystemFunction.depositWithDrawsls(c); } // 转账; if (userChoice == 3) { BankSystemFunction.transferAccounts(c); } // 结算利息; if (userChoice == 4) { BankSystemFunction.settlementInterest(c); } // 修改密码; if (userChoice == 5) { BankSystemFunction.modifyPassword(c); } // 挂失; if (userChoice == 6) { BankSystemFunction.reportTheLoss(c); } } } }

    转载请注明原文地址: https://ju.6miu.com/read-1308636.html
    最新回复(0)