当前位置: 首页 > news >正文

java每日一题——ATM系统编写(答案及编程思路)

前言:

基础语句学完,也可以编写一些像样的程序了,现在要做的是多加练习,巩固下知识点,打好基础,daydayup!

题目:模仿银行ATM系统,可以创建用户,存钱,转账,修改密码注销账户等操作

思路:利用面向对象编程:1,定义一个账户类Account,至少需要包含(卡号、姓名、性别、密码、余额、每次取现额度);2,定义一个ATM类,用来代表ATM系统,负责提供所有的业务需求;3,定义一个测试类Test,负责对我们开发的ATM系统进行测试。

1,创建实体类:

创建一个实体类,用来记录姓名、卡号、性别、密码、余额、每次取现额度等信息。

public class Account {private String card;private String username ;private  char sex;private  String password;private double money;private  double limit;public Account() {}public String getCard() {return card;}public void setCard(String card) {this.card = card;}public String getUsername() {return username + (sex=='男'? "先生":"女士");}public void setUsername(String username) {this.username = username;}public char getSex() {return sex;}public void setSex(char sex) {this.sex = sex;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public double getMoney() {return money;}public void setMoney(double money) {this.money = money;}public double getLimit() {return limit;}public void setLimit(double limit) {this.limit = limit;}
}

2,创建操作类:

1,创建界面 

通过选择1,或选择2进入系统

  public void start(){Scanner sc =new Scanner(System.in);while (true) {System.out.println("======欢迎来到ATM=======");System.out.println("1,用户登陆");System.out.println("2,用户开户");System.out.println("请选择");int id =sc.nextInt();switch (id){case 1://用户登陆login();break;case 2://用户开户Operator();break;default:System.out.println("请重新输入");}}}

2,用户开户 

运用Scanner输入来记入需要记录的信息,值得一提的是:由于Scanner没办法记录char变量,所以使用charAt来取第一个值。

   private  void Operator(){Account acc = new Account();System.out.println("请输入姓名");String name = sc.next();acc.setUsername(name);while (true) {System.out.println("请输入性别(男/女)");char sex = sc.next().charAt(0);if (sex == '男'|| sex == '女'){acc.setSex(sex);break;}else{System.out.println("请输入(男/女)");}}while (true) {System.out.println("请设置你的密码");String password = sc.next();System.out.println("请再次输入你的密码");String okpassword = sc.next();if (password.equals(okpassword)){acc.setPassword(okpassword);break;}else{System.out.println("两次密码不一致,请重新输入");}}System.out.println("请设置每日取款限额");double limit = sc.nextDouble();acc.setLimit(limit);String id =card();acc.setCard(id);accounts.add(acc);System.out.println("恭喜"+acc.getUsername()+"开户成功,您的卡号为:"+acc.getCard());}
2.1系统输入卡号 

由于卡号需要随机生成8位数字,并且不能与其他人的号码重复,所以需要建立两个方法来做调试。一个方法用于生成8位随机数字,一个方法用于检测号码是否重复

private String card(){Random r = new Random();while (true) {String id = "";for (int i = 0; i < 8; i++) {int data=  r.nextInt(10);id +=data;}Account acc= vs(id);if (acc == null){return id;}}}private  Account vs (String card){for (int i = 0; i <accounts.size(); i++) {Account acc= accounts.get(i);if (acc.getCard().equals(card)){return acc;}}return null;

 这样一来,开户也就成功了。接下来是登陆的操作。

3,用户登陆

需要注意的是:当系统中没有账号时,要提示没有账号。登陆时需要注意号码的匹对。

 private void login(){if (accounts.size()==0){System.out.println("请先创建账号");return;}while (true) {System.out.println("请输入卡号");String card = sc.next();Account acc = vs(card);if(acc == null){System.out.println("没有该账号,请重新输入");}else if(acc.getCard().equals(card)){while (true) {System.out.println("请输入密码");String password =sc.next();if (acc.getPassword().equals(password)){acco = acc;check();return;}else{System.out.println("密码不正确,请重新输入");}}}}}

4,业务界面

登陆成功后,便可进行业务选择。运用switch语句可以精准选择业务需求

private void check(){while (true) {System.out.println(acco.getUsername()+"你可以办理以下业务");System.out.println("1.查询账户");System.out.println("2.存款");System.out.println("3.取款");System.out.println("4.转账");System.out.println("5.修改密码");System.out.println("6.退出");System.out.println("7.注销账户");System.out.println("请选择");int check= sc.nextInt();switch (check){case 1:idcheck();break;case 2:moenycheck();break;case 3:moneyleave();break;case 4:transmoney();break;case 5:changepassword();return;case 6:System.out.println("你已经退出");return;case 7:if (deleteid());return;default:System.out.println("你输入的数字有误,请重新输入");}}}
4.1账户确认

建议独立一个方法,其他没什么需要注意的

private  void idcheck(){System.out.println("号码:"+acco.getCard());System.out.println("性别:"+acco.getSex());System.out.println("存款:"+acco.getMoney());System.out.println("每日限额:"+acco.getLimit());}
4.2存款 

 熟用switch语句及死循环能够很好的解决问题

private void moenycheck() {while (true) {System.out.println("欢迎来到存款界面");System.out.println("存款请按1");System.out.println("退出请按2");int sd = sc.nextInt();switch (sd){case 1:System.out.println("请输入你要存多少");double money= sc.nextDouble();System.out.println("请问你确定要存入"+money+"么");System.out.println("确定请按1");System.out.println("返回请按2");int cc =sc.nextInt();switch (cc){case 1:acco.setMoney(acco.getMoney()+money);System.out.println("您的余额为"+acco.getMoney());break;case 2:return;default:System.out.println("请重新输入");}break;case 2:return;default:System.out.println("请重新输入");}}}
4.3取款 

一连串的switch语句和if问句,解决每一项逻辑

 private void moneyleave() {while (true) {System.out.println("欢迎来到取款界面");System.out.println("取款请按1");System.out.println("退出请按2");int sd = sc.nextInt();switch(sd){case 1:System.out.println("你目前的存款为" + acco.getMoney());if (acco.getMoney() < 100) {System.out.println("最低取款金额为100,您的余额不足");break;} else {System.out.println("请输入你要取走的金额");double money = sc.nextDouble();if (acco.getMoney()<money){System.out.println("您的余额不足,请重新输入");break;}else{if (money>acco.getLimit()){System.out.println("您已超过限额,请重新输入");break;}else{System.out.println("您已取走"+money+"元");acco.setMoney(acco.getMoney()- money);System.out.println("您的余额为:"+acco.getMoney());}}}break;case 2:return;default:System.out.println("请重新输入");}}}
4.4转账

选要注意的是:这里需要判断对方的姓氏,采用的方法为“*”加上第二位开始的名字。转账者需要填写姓氏后运用startwith语句进行匹配。

private void transmoney() {while (true) {System.out.println("欢迎来到转账界面");System.out.println("转账请按1");System.out.println("退出请按2");int sd = sc.nextInt();switch (sd){case 1:if (accounts.size()<2){System.out.println("当前系统中只有一个账号,请创建新的账号");break;}if (acco.getMoney()==0){System.out.println("您的余额不足,不能转账");break;}System.out.println("请输入对方的账号");String id =sc.next();Account acc =vs(id);if (acc == null){System.out.println("没有该账号,请重新输入");}else{String name ="*"+acc.getUsername().substring(1);System.out.println("请输入【"+name+"】的姓氏");String trname =sc.next();if (acc.getUsername().startsWith(trname)){System.out.println("请输入转账金额");double money =sc.nextDouble();if (acco.getMoney() >= money){acco.setMoney(acco.getMoney()-money);acc.setMoney(acc.getMoney()+ money);System.out.println("您已转账"+money+"元,您的余额为"+acco.getMoney());break;}else{System.out.println("您的余额不足,不能转账");}}else {System.out.println("姓氏认证有问题");}}break;case 2:return;}}}
4.5 更换密码

使用if语句询问即可,需要注意的是,最后要用return返回,不能用break,(return是退出方法,break是退出循环)

 private void changepassword() {while (true) {System.out.println("欢迎来到更换密码界面");System.out.println("输入当前密码");String pass =sc.next();if (acco.getPassword().equals(pass)){System.out.println("输入新密码");String okpass =sc.next();System.out.println("再一次输入新密码");String okkpass =sc.next();if (okkpass.equals(okpass)){acco.setPassword(okkpass);System.out.println("修改密码成功");return;}else{System.out.println("密码有误");}}else {System.out.println("密码有误");}}}
4.6退出系统  

用return即可

  case 6:System.out.println("你已经退出");return;
4.7删除账户 

删除当前账户即可。当前账户和创建账户的实体类是同一个地址,删除当前账户就是在ArrayList中删除了当前账户实体类的地址

  private boolean deleteid() {while (true) {System.out.println("确定删除么(y/n)");String sd =sc.next();switch (sd){case "y":if (acco.getMoney()==0){accounts.remove(acco);return true;}else{System.out.println("还有存款,不能销户");return false;}default:System.out.println("删除失败");return false;}}}

操作完整版在这里 

这样操作类就完成了,有需要的可以复制这个完整版


import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;public class ATMOperator {private ArrayList<Account> accounts = new ArrayList<>();private Scanner sc = new Scanner(System.in);private  Account acco = new Account();public void start(){Scanner sc =new Scanner(System.in);while (true) {System.out.println("======欢迎来到ATM=======");System.out.println("1,用户登陆");System.out.println("2,用户开户");System.out.println("请选择");int id =sc.nextInt();switch (id){case 1://用户登陆login();break;case 2://用户开户Operator();break;default:System.out.println("请重新输入");}}}private void login(){if (accounts.size()==0){System.out.println("请先创建账号");return;}while (true) {System.out.println("请输入卡号");String card = sc.next();Account acc = vs(card);if(acc == null){System.out.println("没有该账号,请重新输入");}else if(acc.getCard().equals(card)){while (true) {System.out.println("请输入密码");String password =sc.next();if (acc.getPassword().equals(password)){acco = acc;check();return;}else{System.out.println("密码不正确,请重新输入");}}}}}private void check(){while (true) {System.out.println(acco.getUsername()+"你可以办理以下业务");System.out.println("1.查询账户");System.out.println("2.存款");System.out.println("3.取款");System.out.println("4.转账");System.out.println("5.修改密码");System.out.println("6.退出");System.out.println("7.注销账户");System.out.println("请选择");int check= sc.nextInt();switch (check){case 1:idcheck();break;case 2:moenycheck();break;case 3:moneyleave();break;case 4:transmoney();break;case 5:changepassword();return;case 6:System.out.println("你已经退出");return;case 7:if (deleteid());return;default:System.out.println("你输入的数字有误,请重新输入");}}}private void changepassword() {while (true) {System.out.println("欢迎来到更换密码界面");System.out.println("输入当前密码");String pass =sc.next();if (acco.getPassword().equals(pass)){System.out.println("输入新密码");String okpass =sc.next();System.out.println("再一次输入新密码");String okkpass =sc.next();if (okkpass.equals(okpass)){acco.setPassword(okkpass);System.out.println("修改密码成功");return;}else{System.out.println("密码有误");}}else {System.out.println("密码有误");}}}private boolean deleteid() {while (true) {System.out.println("确定删除么(y/n)");String sd =sc.next();switch (sd){case "y":if (acco.getMoney()==0){accounts.remove(acco);return true;}else{System.out.println("还有存款,不能销户");return false;}default:System.out.println("删除失败");return false;}}}private void transmoney() {while (true) {System.out.println("欢迎来到转账界面");System.out.println("转账请按1");System.out.println("退出请按2");int sd = sc.nextInt();switch (sd){case 1:if (accounts.size()<2){System.out.println("当前系统中只有一个账号,请创建新的账号");break;}if (acco.getMoney()==0){System.out.println("您的余额不足,不能转账");break;}System.out.println("请输入对方的账号");String id =sc.next();Account acc =vs(id);if (acc == null){System.out.println("没有该账号,请重新输入");}else{String name ="*"+acc.getUsername().substring(1);System.out.println("请输入【"+name+"】的姓氏");String trname =sc.next();if (acc.getUsername().startsWith(trname)){System.out.println("请输入转账金额");double money =sc.nextDouble();if (acco.getMoney() >= money){acco.setMoney(acco.getMoney()-money);acc.setMoney(acc.getMoney()+ money);System.out.println("您已转账"+money+"元,您的余额为"+acco.getMoney());break;}else{System.out.println("您的余额不足,不能转账");}}else {System.out.println("姓氏认证有问题");}}break;case 2:return;}}}private void moneyleave() {while (true) {System.out.println("欢迎来到取款界面");System.out.println("取款请按1");System.out.println("退出请按2");int sd = sc.nextInt();switch(sd){case 1:System.out.println("你目前的存款为" + acco.getMoney());if (acco.getMoney() < 100) {System.out.println("最低取款金额为100,您的余额不足");break;} else {System.out.println("请输入你要取走的金额");double money = sc.nextDouble();if (acco.getMoney()<money){System.out.println("您的余额不足,请重新输入");break;}else{if (money>acco.getLimit()){System.out.println("您已超过限额,请重新输入");break;}else{System.out.println("您已取走"+money+"元");acco.setMoney(acco.getMoney()- money);System.out.println("您的余额为:"+acco.getMoney());}}}break;case 2:return;default:System.out.println("请重新输入");}}}private void moenycheck() {while (true) {System.out.println("欢迎来到存款界面");System.out.println("存款请按1");System.out.println("退出请按2");int sd = sc.nextInt();switch (sd){case 1:System.out.println("请输入你要存多少");double money= sc.nextDouble();System.out.println("请问你确定要存入"+money+"么");System.out.println("确定请按1");System.out.println("返回请按2");int cc =sc.nextInt();switch (cc){case 1:acco.setMoney(acco.getMoney()+money);System.out.println("您的余额为"+acco.getMoney());break;case 2:return;default:System.out.println("请重新输入");}break;case 2:return;default:System.out.println("请重新输入");}}}private  void idcheck(){System.out.println("号码:"+acco.getCard());System.out.println("性别:"+acco.getSex());System.out.println("存款:"+acco.getMoney());System.out.println("每日限额:"+acco.getLimit());}private  void Operator(){Account acc = new Account();System.out.println("请输入姓名");String name = sc.next();acc.setUsername(name);while (true) {System.out.println("请输入性别(男/女)");char sex = sc.next().charAt(0);if (sex == '男'|| sex == '女'){acc.setSex(sex);break;}else{System.out.println("请输入(男/女)");}}while (true) {System.out.println("请设置你的密码");String password = sc.next();System.out.println("请再次输入你的密码");String okpassword = sc.next();if (password.equals(okpassword)){acc.setPassword(okpassword);break;}else{System.out.println("两次密码不一致,请重新输入");}}System.out.println("请设置每日取款限额");double limit = sc.nextDouble();acc.setLimit(limit);String id =card();acc.setCard(id);accounts.add(acc);System.out.println("恭喜"+acc.getUsername()+"开户成功,您的卡号为:"+acc.getCard());}private String card(){Random r = new Random();while (true) {String id = "";for (int i = 0; i < 8; i++) {int data=  r.nextInt(10);id +=data;}Account acc= vs(id);if (acc == null){return id;}}}private  Account vs (String card){for (int i = 0; i <accounts.size(); i++) {Account acc= accounts.get(i);if (acc.getCard().equals(card)){return acc;}}return null;}
}

最后测试:

public class ATMDemo {public static void main(String[] args) {ATMOperator de = new ATMOperator();de.start();}}

 测试效果:

总结:完美运行,有些语句需要在加强,熟用if语句和switch可以完成精准操作

整理结束撒花!!!! 

 

相关文章:

java每日一题——ATM系统编写(答案及编程思路)

前言&#xff1a; 基础语句学完&#xff0c;也可以编写一些像样的程序了&#xff0c;现在要做的是多加练习&#xff0c;巩固下知识点&#xff0c;打好基础&#xff0c;daydayup! 题目&#xff1a;模仿银行ATM系统&#xff0c;可以创建用户&#xff0c;存钱&#xff0c;转账&…...

《TrollStore巨魔商店》TrollStore2安装使用教程支持IOS14.0-16.6.1

TrollStore(巨魔商店) 简单的说就相当于一个永久的免费证书&#xff0c;它可以给你的iPhone和iPad安装任何你想要安装的App软件&#xff0c;而且不需要越狱,不用担心证书签名过期的问题&#xff0c;不需要个人签名和企业签名。 支持的版本&#xff1a; TrollStore安装和使用教…...

鸿鹄电子招投标系统源码实现与立项流程:基于Spring Boot、Mybatis、Redis和Layui的企业电子招采平台

随着企业的快速发展&#xff0c;招采管理逐渐成为企业运营中的重要环节。为了满足公司对内部招采管理提升的要求&#xff0c;建立一个公平、公开、公正的采购环境至关重要。在这个背景下&#xff0c;我们开发了一款电子招标采购软件&#xff0c;以最大限度地控制采购成本&#…...

力扣-三数之和

三数之和 给你一个整数数组 nums &#xff0c;判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i ! j、i ! k 且 j ! k &#xff0c;同时还满足 nums[i] nums[j] nums[k] 0 。请你返回所有和为 0 且不重复的三元组。 注意&#xff1a;答案中不可以包含重复的三元组。…...

全罐喂养一个月多少钱?适合全罐喂养的猫罐头推荐

不少铲屎官一直没有办法get到猫罐头对猫咪的好处&#xff0c;或者get到了又觉得给猫咪买猫罐头好贵&#xff0c;看到其他铲屎官都开始全罐喂养了&#xff0c;但是自己却迟迟下不了手&#xff0c;犹犹豫豫的不知道全罐喂养一个月多少钱&#xff1f; 今天&#xff0c;铲龄15年的…...

js some方法的使用

JavaScript中的数组some()方法用于检查数组中是否至少有一个元素满足指定条件。该方法会遍历数组&#xff0c;并对每个元素应用指定的测试函数。如果有任何一个元素使得测试函数返回true&#xff0c;则some()方法返回true&#xff0c;否则返回false。 some()方法的语法如下&am…...

QT DAY5作业

1.QT基于TCP服务器端 头文件 #ifndef WIDGET_H #define WIDGET_H#include <QWidget> #include <QTcpServer> //服务器类 #include <QMessageBox> //消息对话框类 #include <QTcpSocket> //客户端类 #include <QList> //链表容器类namespace …...

Hello 2024补题

Wallet Exchange&#xff08;Problem - A - Codeforces&#xff09; 题目大意&#xff1a;A&#xff0c;B做游戏&#xff0c;它们的钱包里各有a,b个硬币&#xff0c;轮到它们操作时&#xff0c;它们可以扔掉自己或者对手钱包里的硬币&#xff0c;谁不能操作谁输&#xff0c;问…...

git权限问题导致的所有文件被修改问题

git忽略文件权限的修改 git config core.filemode false...

C语言经典算法之堆排序算法

目录 前言 建议 简介 A.建堆&#xff1a; B.排序 一、代码实现 二、时空复杂度 A.时间复杂度 B.空间复杂度 三、稳定性 四、现实中的应用 前言 建议 1.学习算法最重要的是理解算法的每一步&#xff0c;而不是记住算法。 2.建议读者学习算法的时候&#xff0c;自己…...

前端笔试题(一)

1.vue如何实现数据的双向绑定 利用v-model来实现双向数据绑定 通过Object.defineProperty()来劫持各个属性的setter&#xff0c;getter&#xff0c;在数据变动时发布消息给订阅者&#xff0c;触发相应的监听回调来渲染视图 2.使用vue渲染大量数据时&#xff0c;如何进行优化…...

Springboot开发的大学生寝室考勤系统刷脸进出宿舍系统技术文档

宿舍出入系统 1.2采集学生人脸信息和宿管人脸信息 前端使用navigator.mediaDevices.getUserMedia&#xff08;考虑个浏览器的内核差异&#xff0c;此处以最新的标准API:navigator.mediaDevices.getUserMedia为例&#xff09;获取用户浏览器的摄像头并开启视频&#xff0c;使用…...

网络共享服务

存储类型&#xff1a;直连式&#xff08;DAS&#xff09;:距离最近&#xff0c;存储设备且直接连接到服务器上 存储区域网络&#xff08;SAN&#xff09;&#xff1a;适用于大型应用或数据库系统&#xff0c;可以使用文件的空间&#xff0c; 以及管理空间…...

资本主义的市场竞争?IBM总监Jerry Chow 谈量子计算的未来

​ 人物介绍&#xff1a;Jerry M.Chow博士在耶鲁大学取得物理博士学位。担任IBM量子系统总监&#xff0c;其研究重点是面向容错量子计算的多量子比特系统。他主要为IBM的量子系统路线图制定战略&#xff0c;与硬件团队领导者一起设定目标研究领域&#xff0c;同时也确保最佳的客…...

什么是残差矢量量化?

一、说明 基于残差矢量量化的神经音频压缩方法正在重塑现代音频编解码器的格局。在本指南中&#xff0c;了解 RVQ 背后的基本思想以及它如何增强神经压缩。 数据压缩在当今的数字世界中发挥着关键作用&#xff0c;促进信息的高效存储和传输。由于当今超过 80% 的互联网流量来自…...

计算机网络(第六版)复习提纲2

二、物理层 2.1 物理层基本概念 物理层协议常常成为物理层规程 物理层的主要任务为确定与传输媒体的接口有关的一些特性&#xff1a; 1.机械特性&#xff1a;指明接口所用接线器的尺寸等&#xff1b; 2.电气特性&#xff1a;指明接口电缆各条线上的电压范围&#xff1b; 3.功能…...

11k+star 开源笔记应用真香 centos部署教程

leanote binary installation on Mac and Linux (En) life edited this page on Jul 21, 2017 10 revisions Pages 26 Home How to develop leanote 如何开发leanote How to install leanote on Ubuntu? How to Upgrade Leanote Install Mongodb leanote api leanote …...

win下安装tensorflow

1首先ctrlaltdelete打开任务管理器查看GPU型号 2或者右键我的电脑然后如下方式查看显卡发现没有navida没有GPU...

SpringBoot 入门

1.SpringBoot介绍 1.1.什么是SpringBoot Spring Boot是由Pivotal团队提供的全新框架&#xff0c;其中“Boot”的意思就是“引导”&#xff0c;Spring Boot 并不是对 Spring 功能上的增强&#xff0c;而是提供了一种快速开发 Spring应用的方式。 1.2.Spring Boot 特点 • 嵌…...

使用WebFlux处理WebSocket连接的全生命周期案例

使用WebFlux处理WebSocket连接的全生命周期案例 简介&#xff1a; 在Web应用程序开发中&#xff0c;WebSocket是一种用于实现双向通信的协议。Spring WebFlux提供了对WebSocket的支持&#xff0c;使您能够轻松地处理WebSocket连接和消息。本博客将介绍如何使用WebFlux处理WebS…...

[10-3]软件I2C读写MPU6050 江协科技学习笔记(16个知识点)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16...

从零开始打造 OpenSTLinux 6.6 Yocto 系统(基于STM32CubeMX)(九)

设备树移植 和uboot设备树修改的内容同步到kernel将设备树stm32mp157d-stm32mp157daa1-mx.dts复制到内核源码目录下 源码修改及编译 修改arch/arm/boot/dts/st/Makefile&#xff0c;新增设备树编译 stm32mp157f-ev1-m4-examples.dtb \stm32mp157d-stm32mp157daa1-mx.dtb修改…...

代理篇12|深入理解 Vite中的Proxy接口代理配置

在前端开发中,常常会遇到 跨域请求接口 的情况。为了解决这个问题,Vite 和 Webpack 都提供了 proxy 代理功能,用于将本地开发请求转发到后端服务器。 什么是代理(proxy)? 代理是在开发过程中,前端项目通过开发服务器,将指定的请求“转发”到真实的后端服务器,从而绕…...

微软PowerBI考试 PL300-在 Power BI 中清理、转换和加载数据

微软PowerBI考试 PL300-在 Power BI 中清理、转换和加载数据 Power Query 具有大量专门帮助您清理和准备数据以供分析的功能。 您将了解如何简化复杂模型、更改数据类型、重命名对象和透视数据。 您还将了解如何分析列&#xff0c;以便知晓哪些列包含有价值的数据&#xff0c;…...

python报错No module named ‘tensorflow.keras‘

是由于不同版本的tensorflow下的keras所在的路径不同&#xff0c;结合所安装的tensorflow的目录结构修改from语句即可。 原语句&#xff1a; from tensorflow.keras.layers import Conv1D, MaxPooling1D, LSTM, Dense 修改后&#xff1a; from tensorflow.python.keras.lay…...

网站指纹识别

网站指纹识别 网站的最基本组成&#xff1a;服务器&#xff08;操作系统&#xff09;、中间件&#xff08;web容器&#xff09;、脚本语言、数据厍 为什么要了解这些&#xff1f;举个例子&#xff1a;发现了一个文件读取漏洞&#xff0c;我们需要读/etc/passwd&#xff0c;如…...

【无标题】路径问题的革命性重构:基于二维拓扑收缩色动力学模型的零点隧穿理论

路径问题的革命性重构&#xff1a;基于二维拓扑收缩色动力学模型的零点隧穿理论 一、传统路径模型的根本缺陷 在经典正方形路径问题中&#xff08;图1&#xff09;&#xff1a; mermaid graph LR A((A)) --- B((B)) B --- C((C)) C --- D((D)) D --- A A -.- C[无直接路径] B -…...

基于IDIG-GAN的小样本电机轴承故障诊断

目录 🔍 核心问题 一、IDIG-GAN模型原理 1. 整体架构 2. 核心创新点 (1) ​梯度归一化(Gradient Normalization)​​ (2) ​判别器梯度间隙正则化(Discriminator Gradient Gap Regularization)​​ (3) ​自注意力机制(Self-Attention)​​ 3. 完整损失函数 二…...

深度学习之模型压缩三驾马车:模型剪枝、模型量化、知识蒸馏

一、引言 在深度学习中&#xff0c;我们训练出的神经网络往往非常庞大&#xff08;比如像 ResNet、YOLOv8、Vision Transformer&#xff09;&#xff0c;虽然精度很高&#xff0c;但“太重”了&#xff0c;运行起来很慢&#xff0c;占用内存大&#xff0c;不适合部署到手机、摄…...

C# winform教程(二)----checkbox

一、作用 提供一个用户选择或者不选的状态&#xff0c;这是一个可以多选的控件。 二、属性 其实功能大差不差&#xff0c;除了特殊的几个外&#xff0c;与button基本相同&#xff0c;所有说几个独有的 checkbox属性 名称内容含义appearance控件外观可以变成按钮形状checkali…...