当前位置: 首页 > 编程日记 > 正文

Java项目:控制台商城系统(java+打印控制台)

源码获取:博客首页 "资源" 里下载!

功能简介:

客户信息管理、商品信息管理、购物信息管理、退出系统

显示系统主菜单:

public class SystemMenu {//显示系统主菜单public void showMainMenu(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("*                                                       *");System.out.println("*               欢迎使用迷你青春购物系统                  	                *");System.out.println("*                                                       *");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");System.out.println("1.客户信息管理\n");System.out.println("2.商品信息管理\n");System.out.println("3.购物信息管理\n");System.out.println("4.退出系统\n");boolean flag;do{System.out.println("\n请选择功能(1-4):");Scanner sc = new Scanner(System.in);int fun = sc.nextInt();flag = false;switch(fun){case 1:showCustomerMenu();break;case 2:showProductMenu();break;case 3:buyProductMenu();break;case 4:System.out.println("您已安全退出!欢迎下次使用本系统....");System.exit(0);break;default:System.out.println("请选择相应的功能,在1-4之间选择。");flag = true;}}while(flag);}//显示客户管理菜单public void showCustomerMenu(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("迷你青春购物系统 >> 客户信息管理");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");System.out.println("1.显示所有客户信息\n");System.out.println("2.添加客户信息\n");System.out.println("3.修改客户信息\n");System.out.println("4.删除客户信息\n");System.out.println("5.返回上一级菜单\n");System.out.println();Scanner sc = new Scanner(System.in);System.out.println("请选择功能(1-5):");int fun = sc.nextInt();CustomerManager cm = new CustomerManager();switch(fun){case 1:cm.showAllCustomerInfo();break;case 2:cm.addCustomer();break;case 3:cm.updateCustomer();break;case 4:cm.deleteCustomer();break;case 5:showMainMenu();break;default:System.out.println("请选择相应的功能,在1-5之间选择。");}}/** 显示商品管理菜单*/public void showProductMenu(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("迷你青春购物系统 >> 商品信息管理");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");System.out.println("1.显示所有商品信息\n");System.out.println("2.添加商品信息\n");System.out.println("3.修改商品信息\n");System.out.println("4.删除商品信息\n");System.out.println("5.返回上一级菜单\n");System.out.println();Scanner sc = new Scanner(System.in);System.out.println("请选择功能(1-5):");int fun = sc.nextInt();ProductManager pm = new ProductManager();switch(fun){case 1:pm.showAllProductInfo();break;case 2:pm.addProduct();break;case 3:pm.updateProduct();break;case 4:pm.deleteProduct();break;case 5:showMainMenu();break;default:System.out.println("请选择相应的功能,在1-5之间选择。");}}/** 显示购物管理菜单*/public void buyProductMenu(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("迷你青春购物系统 >> 购物信息管理");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");System.out.println("1.购买商品\n");System.out.println("2.优惠活动\n");System.out.println("3.幸运抽奖\n");System.out.println("4.返回上一级菜单\n");System.out.println();Scanner sc = new Scanner(System.in);System.out.println("请选择功能(1-4):");int fun = sc.nextInt();BuyManager bm = new BuyManager();switch(fun){case 1:bm.buyProduct();break;case 2:bm.buyCheapenProduct();break;case 3:bm.luckLottery();break;case 4:showMainMenu();break;default:System.out.println("请选择相应的功能,在1-4之间选择。");}}
}

购买商品:

public class BuyManager {/** 购买商品*/public void buyProduct(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("迷你青春购物系统 >> 购物信息管理 >> 购买商品");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");int [] productId; //用于存储商品的编号String [] productName;//用于存储商品的名称float [] price;//用于存储商品的价格int [] number;//用于存储商品的现有数量//显示所有商品ProductDAO productDao = new ProductDAO();ArrayList<ProductManager> lst = productDao.select();//判断是否还有商品if(lst.size() == 0){System.out.println("商品已全部售完,请下次再来。");returnBuyProductFirstMenu();//调用返回上一级菜单方法return;}//初始化数组大小,数组的长度与查出的信息记录数相等productId = new int[lst.size()];productName = new String[lst.size()];price = new float[lst.size()];number = new int[lst.size()];System.out.println("商品编号\t\t商品名称\t\t价格\t\t数量\t");System.out.println("----------|--------------|--------------|--------------\n");for(int i=0;i<lst.size();i++){ProductManager pm = lst.get(i);System.out.println(pm.getProductId()+"\t\t"+pm.getProductName()+"\t\t¥"+pm.getPrice()+"\t\t"+pm.getNumber());productId[i] = pm.getProductId();//将所有商品的编号存入数组中productName[i] = pm.getProductName();//将所有商品的名称存入数组中price[i] = pm.getPrice();//将所有商品的价格存入数组中number[i] = pm.getNumber();//将所有商品的现有数量存入数组中}Scanner sc = new Scanner(System.in);String answer="";int id = 0;//购买商品的编号int num = 0;//购买的数量ArrayList<ProductManager> buyList = new ArrayList<ProductManager>();//购买的商品列表do{System.out.println("\n请选择购买的商品编号:");id = sc.nextInt();//查找输入的商品编号是否存在boolean flag = false;int index = 0;//该商品的下标for(int j=0;j<productId.length;j++){//如果商品编号存在,就停止循环if(productId[j] == id){flag = true;index = j;break;}}//如果商品编号存在,才能添加商品if(flag){do{	System.out.println("请输入购买的数量:");num = sc.nextInt();//判断输入的数量是否大于商品现存的数量if(num > number[index]){System.out.println("\n该商品数量已不足!请重新输入数量!");}else if(num<=0){System.out.println("商品数量必须大于0!");}else{System.out.println("\n本次消费单信息如下:");float sum = price[index] * num;//每个商品的总金额=价格*数量System.out.println(productName[index]+"\t\t¥"+price[index]+"\t\t¥"+sum);ProductManager pm = new ProductManager();pm.setProductName(productName[index]);pm.setPrice(price[index]);pm.setNumber(num);buyList.add(pm);}System.out.println("\n是否继续输入购买数量(y/n):");answer =sc.next().trim();}while(answer.equals("y") || answer.equals("Y"));}else{System.out.println("\n您选择的商品不存在!请选择正确的商品编号!");}System.out.println("\n是否继续选择购买的商品编号(y/n):");answer =sc.next().trim();}while(answer.equals("y") || answer.equals("Y"));//是否购买了商品if(buyList.size()>0){System.out.println("\n* * * * * * * * * * * 购买商品消费单 * * * * * * * * * * *\n");float allMoney = 0;//所有消费金额System.out.println("购买商品\t\t单价\t\t数量\t\t金额");for(int i=0;i<buyList.size();i++){ProductManager pm = buyList.get(i);System.out.println(pm.getProductName()+"\t\t¥"+pm.getPrice()+"\t\t"+pm.getNumber()+"\t\t¥"+pm.getPrice()*pm.getNumber());allMoney += pm.getPrice()*pm.getNumber();//累加}System.out.println("\n金额总计:"+allMoney);System.out.println("\n填写支付信息:");//将消费信息更新到数据库System.out.println("请输入会员号:");String customerNo = sc.next().trim();System.out.println("请输入密码:");String customerPwd = sc.next().trim();int score = calScore(allMoney);//得到本次消费的积分CustomerDAO customerDao = new CustomerDAO();//根据会员号和密码查询客户信息,查看余额是否足够CustomerManager customer = customerDao.selectByCustomerNoPwd(customerNo, customerPwd);if(customer.getBalance() > allMoney){//如果余额足够,才能进行购物if(customerDao.calBuyProduct(customerNo, customerPwd, allMoney, score, num, id)){System.out.println("\n购物成功!本次购物所获得的积分是:"+score);}else{System.out.println("\n购买商品失败!");}}else{System.out.println("\n对不起!您的余额不足。");}}returnBuyProductFirstMenu();//调用返回上一级菜单方法}/** 优惠活动,当购物超过一定的金额时,给予优惠。*/public void buyCheapenProduct(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("迷你青春购物系统 >> 购物信息管理 >> 优惠活动");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");int [] productId; //用于存储商品的编号String [] productName;//用于存储商品的名称float [] price;//用于存储商品的价格int [] number;//用于存储商品的现有数量//显示所有商品ProductDAO productDao = new ProductDAO();ArrayList<ProductManager> lst = productDao.select();//判断是否还有商品if(lst.size() == 0){System.out.println("商品已全部售完,请下次再来。");returnBuyProductFirstMenu();//调用返回上一级菜单方法return;}//初始化数组大小,数组的长度与查出的信息记录数相等productId = new int[lst.size()];productName = new String[lst.size()];price = new float[lst.size()];number = new int[lst.size()];System.out.println("商品编号\t\t商品名称\t\t价格\t\t数量\t");System.out.println("----------|--------------|--------------|--------------\n");for(int i=0;i<lst.size();i++){ProductManager pm = lst.get(i);System.out.println(pm.getProductId()+"\t\t"+pm.getProductName()+"\t\t¥"+pm.getPrice()+"\t\t"+pm.getNumber());productId[i] = pm.getProductId();//将所有商品的编号存入数组中productName[i] = pm.getProductName();//将所有商品的名称存入数组中price[i] = pm.getPrice();//将所有商品的价格存入数组中number[i] = pm.getNumber();//将所有商品的现有数量存入数组中}Scanner sc = new Scanner(System.in);String answer="";int id = 0;//购买商品的编号int num = 0;//购买的数量ArrayList<ProductManager> buyList = new ArrayList<ProductManager>();//购买的商品列表do{System.out.println("\n请选择购买的商品编号:");id = sc.nextInt();//查找输入的商品编号是否存在boolean flag = false;int index = 0;//该商品的下标for(int j=0;j<productId.length;j++){//如果商品编号存在,就停止循环if(productId[j] == id){flag = true;index = j;break;}}//如果商品编号存在,才能添加商品if(flag){do{	System.out.println("请输入购买的数量:");num = sc.nextInt();//判断输入的数量是否大于商品现存的数量if(num > number[index]){System.out.println("\n该商品数量已不足!请重新输入数量!");}else if(num<=0){System.out.println("商品数量必须大于0!");}else{System.out.println("\n本次消费单信息如下:");float sum = price[index] * num;//每个商品的总金额=价格*数量System.out.println(productName[index]+"\t\t¥"+price[index]+"\t\t¥"+sum);ProductManager pm = new ProductManager();pm.setProductName(productName[index]);pm.setPrice(price[index]);pm.setNumber(number[index]);buyList.add(pm);}System.out.println("\n是否继续输入购买数量(y/n):");answer =sc.next().trim();}while(answer.equals("y") || answer.equals("Y"));}else{System.out.println("\n您选择的商品不存在!请选择正确的商品编号!");}System.out.println("\n是否继续选择购买的商品编号(y/n):");answer =sc.next().trim();}while(answer.equals("y") || answer.equals("Y"));//是否购买了商品if(buyList.size()>0){System.out.println("\n* * * * * * * * * * * 购买商品消费单 * * * * * * * * * * *\n");float allMoney = 0;//所有消费金额System.out.println("购买商品\t\t单价\t\t数量\t\t金额");for(int i=0;i<buyList.size();i++){ProductManager pm = buyList.get(i);System.out.println(pm.getProductName()+"\t\t¥"+pm.getPrice()+"\t\t"+pm.getNumber()+"\t\t¥"+pm.getPrice()*pm.getNumber());allMoney += pm.getPrice()*pm.getNumber();//累加}int score = calScore(allMoney);//得到本次消费的积分allMoney = calMoney(allMoney); //进行打折后的总金额System.out.println("\n金额总计:"+allMoney);System.out.println("\n填写支付信息:");//将消费信息更新到数据库System.out.println("请输入会员号:");String customerNo = sc.next().trim();System.out.println("请输入密码:");String customerPwd = sc.next().trim();CustomerDAO customerDao = new CustomerDAO();//根据会员号和密码查询客户信息,查看余额是否足够CustomerManager customer = customerDao.selectByCustomerNoPwd(customerNo, customerPwd);if(customer.getBalance() > allMoney){//如果余额足够,才能进行购物if(customerDao.calBuyProduct(customerNo, customerPwd, allMoney, score, num, id)){System.out.println("\n购物成功!本次购物所获得的积分是:"+score);}else{System.out.println("\n购买商品失败!");}}else{System.out.println("\n对不起!您的余额不足。");}}returnBuyProductFirstMenu();//调用返回上一级菜单方法}/** 幸运抽奖,只有当积分超过一定的分数时,才能进行抽奖。*/public void luckLottery(){System.out.println("\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * *");System.out.println("迷你青春购物系统 >> 购物信息管理 >> 幸运抽奖");System.out.println("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");Scanner sc = new Scanner(System.in);System.out.println("请输入积分:");int score = sc.nextInt();//当积分大于500时,才能进行抽奖if(score > 500){System.out.println("\n请输入抽奖信息:");System.out.println("\n请输入会员号:");int customerNo = sc.nextInt();int qianwei = customerNo / 1000;//分解出千位数字int baiwei = customerNo % 1000 /100;//分解出百位数字int shiwei = customerNo % 100 /10;//分解出十位数字int gewei = customerNo % 10;//分解出个位数字int sum = qianwei + baiwei + shiwei + gewei;Random rd = new Random();int random = rd.nextInt(36)+1;//产生一个1到36之间的数//当随机产生的数字与会员号分解的各位数字的和相等时,即为中奖客户if(sum == random){System.out.println("\n恭喜!会员号为 "+customerNo+" 的幸运客户,获得精美MP4一个!");}else{System.out.println("\n会员号为 "+customerNo+" 的客户,感谢您的支持!");}}else{System.out.println("\n您的积分不足,不能进行抽奖!");}returnBuyProductFirstMenu();//调用返回上一级菜单方法}/** 计算会员积分*/public int calScore(float sum){int score = 0;if(0<sum && sum<=50){score = 2;}else if(50<sum && sum<=100){score = 5;}else if(100<sum && sum<=500){score = 7;}else if(500<sum && sum<=1000){score = 10;}else{score = 12;}return score;}/** 根据购买金额打折*/public float calMoney(float allMoney){float cutMoney = 0;if(0<allMoney && allMoney<=150){cutMoney = allMoney * 0.95f;//打0.95折System.out.println("\n该会员享受的折扣是:0.95折");}else if(150<allMoney && allMoney<=200){cutMoney = allMoney * 0.9f;//打0.9折System.out.println("\n该会员享受的折扣是:0.9折");}else if(200<allMoney && allMoney<=300){cutMoney = allMoney * 0.8f;//打0.8折System.out.println("\n该会员享受的折扣是:0.8折");}else if(300<allMoney && allMoney<=500){cutMoney = allMoney * 0.7f;//打0.7折System.out.println("\n该会员享受的折扣是:0.7折");}else{cutMoney = allMoney * 0.65f;//打0.7折System.out.println("\n该会员享受的折扣是:0.65折");}return cutMoney;}/** 返回上一级菜单*/public void returnBuyProductFirstMenu(){Scanner sc = new Scanner(System.in);System.out.println("\n按任意键返回上一级菜单:");sc.next();SystemMenu sm = new SystemMenu();sm.buyProductMenu();//返回上一级菜单}
}

源码获取:博客首页 "资源" 里下载!

相关文章:

PAT (Basic Level) Practise (中文)-1025. 反转链表 (25)

PAT (Basic Level) Practise &#xff08;中文&#xff09;-1025. 反转链表 (25) http://www.patest.cn/contests/pat-b-practise/1025 给定一个常数K以及一个单链表L&#xff0c;请编写程序将L中每K个结点反转。例如&#xff1a;给定L为1→2→3→4→5→6&#xff0c;K为3&am…

初识Quartz(三)

为什么80%的码农都做不了架构师&#xff1f;>>> 简单作业&#xff1a; package quartz_project.example3;import java.util.Date;import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.quartz.Job…

内存分配器设计的演进

文章目录栈内存空间是否够用系统调用申请内存最简单的内存分配器实现 -- bump allocator可扩容的 Bump alloactor通过free-list 管理的 allocator通过size-buckets 维护多个free-list 的 allocatorCache friendly allocator需要考虑更多问题的allocator性能易用性本文希望描述一…

Android OpenGL ES(十一)绘制一个20面体 .

前面介绍了OpenGL ES所有能够绘制的基本图形&#xff0c;点&#xff0c;线段和三角形。其它所有复杂的2D或3D图形都是由这些基本图形构成。 本例介绍如何使用三角形构造一个正20面体。一个正20面体&#xff0c;有12个顶点&#xff0c;20个面&#xff0c;30条边构成&#xff1a;…

Java项目:学生选课系统(java+javaweb+jdbc)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 用户菜单、学生管理、教师管理、课程管理、成绩排名查询 学生管理控制层&#xff1a; Controller RequestMapping("/student") public class StudentController {private …

Xtrabackup对mysql全备以及增量备份实施

Xtrabackup对mysql全备以及增量备份实施1.完全备份与恢复本文使用的是centos5.8 64位系统&#xff0c;mysql 使用5.5.35.如果要使用一个最小权限的用户进行备份&#xff0c;可基于以下&#xff1a;mysql> createuser bkuserlocalhost identified by redhat;mysql> grant …

js浅拷贝和深拷贝

浅度拷贝&#xff1a;复制一层对象的属性&#xff0c;并不包括对象里面的为引用类型的数据&#xff0c;当改变拷贝的对象里面的引用类型时&#xff0c;源对象也会改变。 深度拷贝&#xff1a;重新开辟一个内存空间&#xff0c;需要递归拷贝对象里的引用&#xff0c;直到子属性都…

关于 fallocate 文件系统预分配 的一些细粒度测试

文章目录Rocksdb 中的预分配Fallocate in rocksdb 性能测试Fallocate 使用 以及 对应配置的行为API 使用不同 Mode 的行为分配磁盘空间释放磁盘空间折叠/裁剪 文件内容清零文件 扩容文件Rocksdb 中的预分配 预分配文件存储空间 在存储引擎中用的还是比较频繁的&#xff0c;尤…

mac 使用nvm安装node

1.curl https://raw.github.com/creationix/nvm/master/install.sh | sh2。vi ~/.bash_profile 添加&#xff1a;source /Users/dujie/.nvm/nvm.sh nvm install 0.10.24 nvm use 0.10.24 # 默認使用 0.10.24 版本&#xff0c;否則每次關掉 Terminal 就得重新 nvm use 一次 $…

Java项目:人事管理系统(java+javaweb+jdbc)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 登录、新增、修改、离职 员工管理控制层&#xff1a; Controller RequestMapping("/employee") public class EmployeeController {Autowiredprivate IEmployeeService em…

转:async await 的前世今生 ; 异步 线程 多线程

写的非常好,改天搬过来

ubuntu14.04初体会

2014年4月17日ubuntu新的长期支持版14.04公布了&#xff0c;中国时间18日一早就能够下载到。18日晚。在我的X200上安装上了14.04&#xff0c;算是比較早一批体会到14.04正式版的人吧。对照12.04&#xff0c;14.04提升的执行速度非常明显&#xff0c;界面改善也是令人眼前一亮&a…

Linux 下获取本机所有网卡 以及 网卡对应ip 列表

简单record 一下 #include <arpa/inet.h> // struct sockaddr_in #include <errno.h> #include <net/if.h> // struct ifreq and struct if_nameindex #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/i…

Java项目:植物大战僵尸(java+swing)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能简介&#xff1a; 植物大战僵尸、冒险模式、生存模式、解谜模式 小车服务类&#xff1a; public class CarThread extends Thread{private boolean flagtrue;private int x;private int y;private JL…

秋实大哥の恋爱物语

//裸kmp&#xff0c;劳资居然不会写&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01; 题意&#xff1a;中文题面自己看 解&#xff1a;差分裸kmp 因为可以上下移动&#xff0c;所以只要变化趋势相符就行&#xff0c;于是我们先做一个差分&#xff0c…

《马哥出品高薪linux运维教程》wingkeung学习笔记-linux基础入门课程5

命令&#xff1a;内部命令&#xff1a;由shell程序自带的命令叫做内部命令&#xff1b;外部命令&#xff1a;在系统的某个路径下&#xff0c;有一个与命令同名的可执行程序叫做外部命令。查看内外部命令的命令&#xff1a;type 命令命令选项&#xff1a;用于调整命令执行行为的…

八、LaTex中的表格

转载于:https://www.cnblogs.com/invisible2/p/10813964.html

基于持久内存的 单机上亿(128B)QPS -- 持久化 k/v 存储引擎

文章目录性能数据设计背景设计架构Hash 索引结构 及 PMEM空间管理形态基本API 及 实现API初始化流程写流程读流程删除流程PMEM Allocator设计主要组件空间分配流程空间释放图数据库 on KVDK 性能性能数据 这个kv 存储引擎是持久化的存储引擎&#xff0c;存储介质是PMEM&#x…

SCALA当的trait

不是特别懂&#xff0c;但感觉和RUBY当中的MIX-IN功能有几分相似&#xff0c;这又扯到了多重继承及JAVA当中的接口虚拟类了。。 package com.hengheng.scalaclass UseTrait {} trait Logger {def log(msg : String) {println("log : " msg)} } trait ConsoleLogger …

Java项目:贪吃蛇游戏(java+swing)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能简介&#xff1a; 贪吃蛇游戏 大嘴鱼洁面类。完成大嘴鱼的界面的绘制: /*** 大嘴鱼洁面类。完成大嘴鱼的界面的绘制。*/ public class BigMouthFishFrame extends JFrame{private FishPool pool null;…

使用Ext Form自动绑定Html中的Form元素

2019独角兽企业重金招聘Python工程师标准>>> Java代码 //把ext 对象绑定在Html Form元素时的ext属性中 Ext.override(Ext.Component, { initComponent :function(){ this.on(render, function(){ if(this.el) Ext.getDom(this.el).ext this; …

Directx11 教程(2) 基本的windows应用程序框架(2)

Directx11 教程(2) 基本的windows应用程序框架(2) 原文:Directx11 教程(2) 基本的windows应用程序框架(2)在本教程中&#xff0c;我们把前面一个教程的代码&#xff0c;进行封装。把初始化函数&#xff0c;Run函数&#xff0c;窗口回调函数&#xff0c;ShutdownWindows函数等封…

Rocksdb的事务(二):完整事务体系的 详细实现

文章目录1. 基本事务操作1.1 TransactionDB -- Pessimistic1.2 OptimisticTransactionDB1.3 Read Uncommitted1.4 SavePoint 回滚部分事务操作1.5 SetSnapshot1.6 GetForUpdate1.7 RepeatableRead2. 实现2.1 WBWI(write batch with index) & WB(write batch)2.2 Pessimisti…

关于学习编程的一些看法

1、看书&#xff0c;书上的代码一串一串的对吧&#xff1f;是不是很不好记&#xff1f;是不是觉得如果自己把这些代码都敲一遍很浪费时间&#xff1f;其实对于一些完全没有任何基础的人来说&#xff0c;全部敲一遍不失为一种简单的入门方法。对于有一点基础的人来说&#xff0c…

Java项目:日历万年历(java+swing)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能简介&#xff1a; 万年历 启动类&#xff1a; public class CalendarMainClass { public static void main(String args[]) { try { UIManager.setLookAndFeel("com.sun.java.swing.pl…

求大神给解释一下H3C ospf 双塔奇兵

转载于:https://blog.51cto.com/2807200/1364566

活着是为了什么?

活着是为了死亡&#xff0c;死亡才是完美&#xff0c;才是永恒。 死亡时将一无所有&#xff0c;所以活着不是为了能带走什么&#xff0c;而应该是能留下什么&#xff0c;这才是人活着的意义&#xff0c;多少人能想明白呢&#xff1f; 胡建龙转载于:https://www.cnblogs.com/hjl…

XFS 文件系统 (一) :设计概览

文章目录0 前言1 设计背景2. 需要解决的问题2.1 异常恢复太慢2.2 不支持大文件系统2.3 不支持大型稀疏文件2.4 不支持大型连续文件2.5 不支持大目录2.6 不支持过多文件个数3 XFS 架构4 痛点解决4.1 Allocation Groups4.2 Manging Free Space4.3 大文件的支持5 总结0 前言 虽然…

WebApi2官网学习记录---异常处理

HttpResponseException 当WebAPI的控制器抛出一个未捕获的异常时&#xff0c;默认情况下&#xff0c;大多数异常被转为status code为500的http response即服务端错误。 HttpResonseException是一个特别的情况&#xff0c;这个异常可以返回任意指定的http status code&#xff0…

Java项目:资源下载工具(java+swing)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能简介&#xff1a; 下载地址、保存位置、下载设置、下载进度 文件仓库控制器&#xff1a; /*** ClassName: FileStoreController* Description: 文件仓库控制器**/ Controller public class FileStoreC…