# ATM_simulation **Repository Path**: code-backup-hub/atm_simulation ## Basic Information - **Project Name**: ATM_simulation - **Description**: 用于2023-2024学年度第二学期Java期末答辩 - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-18 - **Last Updated**: 2026-05-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: Java ## README # **ATM_simulation** 蔡永斌的 **Java** 期末结课作业 项目采取GPL-3.0开源许可协议 ## 项目基本信息 ### 项目选题 本项目选取期末项目 **自主命题** 项目 经考虑,决定选取Java期末实训任务选题中的 **ATM模拟程序** 题目要求如下: ATM模拟程序: 输入给定的卡号和密码(初始卡号为62250028和密码为123456)时,系统能登录ATM柜员机系统,用户可以按照以下规则进行操作: 1. 查询余额:初始余额为10000元 2. ATM取款:每次取款金额为100的倍数,总额不超过5000元,支取金额不允许透支 3. ATM存款:不能出现负存款 4. 修改密码:新密码长度不小于6位,不允许出现6位完全相同的情况,只有旧密码正确,新密码符合要求,且两次输入相同的情况下才可以成功修改密码 5. 要求数据采用文件存储,如果采用数据库存储数据,且界面实现采用了GUI,则酌情提档给分 ### 项目结构说明 #### 项目树状图 ```tree ├─lib └─src └─com └─paolu ├─jFrame │ ├─superjFrame │ │ └─secondaryJFrame │ └─userjFrame │ └─secondaryJFrame ├─sql └─utils ``` #### 具体解释 1. lib 数据库JDBC驱动 2. src 项目源代码 3. jFrame GUI界面 4. sql 数据库操作实现语句 5. utils 工具类及实体类 ### 时间段 1. 项目于2024年6月20日立项 2. 项目于2024年6月23日结项 3. 项目于2024年6月24日09:00:00时分完成答辩 4. 项目与2024年6月27日完成存档 ## 数据库结构 数据库表 普通用户表 ```sql create table user_atm( id_atm bigint not null primary key auto_increment, name_atm varchar(30) not null, password int not null, balance bigint default 0 )auto_increment=62250030; ``` 普通日志表 ```sql create table log_atm( id_log bigint not null primary key auto_increment, id_atm bigint not null, time_atm datetime default current_timestamp )auto_increment=1; ``` 普通用户测试数据 ```sql insert into user_atm values (62250028,'蔡永斌',123456,10000), (62250029,'阮豪豪',147258,10000); ``` 管理员表 ```sql create table superUser_atm( id_super varchar(10) not null primary key, name_super varchar(30) not null, password bigint not null ); ``` 管理员日志表 ```sql create table log_atm_super( id_log bigint not null primary key auto_increment, d_super varchar(255) not null, time_atm datetime default current_timestamp )auto_increment=1; ``` 管理员测试数据 ```sql insert into superUser_atm values ('su1001','admin',1111); ``` 其他语句 查询 ```sql select * from user_atm; select * from log_atm; select * from superUser_atm; select * from log_atm_super; ``` 删除 ```sql drop table user_atm; drop table log_atm; drop table superUser_atm; drop table log_atm_super; ```