小怡分享之Java图书管理系统

news2024/9/23 17:17:39

前言:

      🌈✨前面小怡给大家分享了抽象类和接口,今天小怡给大家分享用Java实现图书管理系统。

 1.功能

                  不同的用户看到的菜单是不一样的,我们分为两个用户身份,管理员和普通用户。 

2.知识点 

           数据类型、变量、数组、方法、类和对象、继承和多态、封装、抽象类和接口。今天要把上述知识点全部用起来。 

3. 实现框架

          首先我们要建立一个新的文件 ,在文件内建立三个包,分别命名为book(书籍)、user(使用者)、ioperation(操作)。

 3.1   book包

              因为是图书管理系统,我们先写和图书相关的内容。book包里有三个类,分别是Book(图书)、BookList(书架)、Main(主功能)。

 

Book类:

public class Book {
    private String name;//书名
    private String author;//作者
    private int price;//价格
    private String type;//书籍类型
    private boolean isBorrowed;//是否借出

    public Book(String name, String author, int price, String type) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", isBorrowed=" + isBorrowed +
                '}';
    }
}

BookList类:

public class BookList {
    private Book[] books=new Book[10];
    private int usedSize;//有效的数据个数【实际放的书的个数】
    public BookList(){
        books[0]=new Book("三国演义","罗贯中",30,"小说");
        books[1]=new Book("西游记","吴承恩",40,"小说");
        books[2]=new Book("红楼梦","曹雪芹",50,"小说");
        this.usedSize=3;
    }
}

Main类(这个得在其他类写好了才来写):

public class Main {
    public static User login(){
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您的姓名:   ");
        String name=scanner.nextLine();
        System.out.println("请输入您的身份,1.管理员  2.普通用户:   ");
        int choice=scanner.nextInt();
        if (choice==1){
            return new Librarian(name);
        }else if(choice==2){
            return new Reader(name);
        }else{
            return null;
        }
    }
    public static void main(String[] args) {
        BookList bookList=new BookList();
        User user=login();
        user.menu();
        int choice=user.menu();
        user.doIoperation(choice,bookList);
    }
}

3.2   user包 

        user包里有三个类,分别是:Librarian(图书管理员)、Reader(读者)、User(使用者)。

 User类:

public abstract class User {
    protected String name;
    protected IOPeration[] ioPerations;
    public User(String name){
        this.name=name;
    }
    public abstract int menu();
    public void  doIoperation(int choice, BookList bookList){
        ioPerations[choice].work(bookList);
    }
}

Librarian类:

public class Librarian extends User{
    public Librarian(String name) {
        super(name);
        this.ioPerations=new IOPeration[]{
        new ExitOperation(),
        new FindOperation(),
        new AddOperation(),
        new DelOperation(),
        new ShowOperation(),
        };
    }

    public int menu(){
        System.out.println("欢迎"+name+"来到图书管理系统");
        System.out.println("*******管理员菜单*******");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        System.out.println("***********************");
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您的操作:   ");
        int choice=scanner.nextInt();
        return choice;
    }
}

Reader类:

public class Reader extends User{
    public Reader(String name) {
        super(name);
        this.ioPerations=new IOPeration[]{new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }
    public int menu(){
        System.out.println("欢迎"+name+"来到图书管理系统");
        System.out.println("*******读者菜单*******");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0.退出系统");
        System.out.println("*********************");
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您的操作:   ");
        int choice=scanner.nextInt();
        return choice;
    }
}

           

3.3   ioperation 包

          现在书的属性和用户的属性的包和类以及完成差不多,由于想要实现的功能和操作基本上是针对图书的,我们可以创一个包ioperation,还有命名一个接口IOPeration。 里卖弄有七个类,一个接口。

          

 

AddOperation类(新增图书):

public class AddOperation implements IOPeration{
        public void work(BookList bookList){
            System.out.println("新增图书……");
        }
}

 BorrowOperation类(借阅图书):

public class BorrowOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("借阅图书……");
    }
}

DelOperation类(删除图书): 

public class DelOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("删除图书……");
    }
}

 ExitOperation类(退出系统):

public class ExitOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("退出系统……");
    }
}

FindOperation类(查找图书): 

public class FindOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("查找图书……");
    }
}

 IOPeration接口:

public interface IOPeration {
    void work(BookList bookList);
}

ReturnOperation类(归还图书): 

public class ReturnOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("归还图书……");
    }
}

ShowOperation类(显示图书): 

public class ShowOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("显示图书……");
    }
}

 

4.实现功能 

 4.1  退出系统

           退出系统比较容易实现 

System.exit(0);

 

4.2     显示图书

           显示图书其实就需要遍历数组,我们使用一个for循环就行。

int currentSize=bookList.getUsedSize();
        for(int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            System.out.println(book);
        }

          在BookList里面也要加上get和set。

 public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(int pos,Book book) {
        this.books[pos] = book;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

 

4.3    查找图书 

             这里用到了for循环和equals

 Scanner scanner=new Scanner(System.in);
    System.out.printf("请输入您的书名:  ");
    String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        for (int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                System.out.println("找到了这本书");
                System.out.println(book);
                return;
            }
        }
        System.out.println("没有你要找的这本书");

 

 4.4   新增图书

            要先输入各种成员变量构建对象,再判断数组满没满,然后放到数组的最后一个位置,used++。

public void work(BookList bookList){
            System.out.println("新增图书……");
            int currentSize=bookList.getUsedSize();
            if(currentSize==bookList.getBooks().length){
                System.out.println("书架满了,不能放了");
                return;
            }
            Scanner scanner=new Scanner(System.in);
            System.out.println("请输入书名:   ");
            String name=scanner.nextLine();
            System.out.println("请输入作者:   ");
            String author=scanner.nextLine();
            System.out.println("请输入价格:   ");
            int price=scanner.nextInt();
            System.out.println("请输入书的类型:   ");
            String type=scanner.nextLine();
            Book newbook=new Book(name,author,price,type);
            for (int i=0;i<currentSize;i++){
                Book book=bookList.getBooks(i);
                if(book.getName().equals(name)){
                    System.out.println("有这本书,不能增加");
                    System.out.println(book);
                    return;
                }
            }
            bookList.setBooks(currentSize,newbook);
            bookList.setUsedSize(currentSize+1);
            System.out.println("新增图书成功");
        }

 

 4.5    借阅图书

            借阅图书和查找图书有很大一部分是相似的。

int currentSize=bookList.getUsedSize();
        for (int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                if (book.isBorrowed()==true){
                    System.out.println("这本书已经被借出了");
                    return;
                }
                book.setBorrowed(true);
                System.out.println("借阅成功");
                return;
            }
        }
        System.out.println("没有你要借阅的这本书");

 

4.6   归还图书 

           借阅和归还的整体逻辑是修改状态。 

System.out.println("归还图书……");
        Scanner scanner=new Scanner(System.in);
        System.out.printf("请输入您归还的书名:  ");
        String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        for (int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                if (book.isBorrowed()==true){
                    book.setBorrowed(false);
                    System.out.println("归还成功");
                    return;
                }
                
            }
        }
        System.out.println("没有你要归还的图书");

 

4.7    删除图书 

         

Scanner scanner=new Scanner(System.in);
        System.out.print("请输入您删除的书名:  ");
        String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        int pos=-1;
        int i=0;
        for (;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                System.out.println("找到了这本书");
                pos=i;
                break;
            }
        }
        if (i==currentSize){
            System.out.println("没有你要删除的书");
            return;
        }
        //开始删除
        for (int j=pos;j<currentSize-1;j++){
            Book book=bookList.getBooks(j+1);
            bookList.setBooks(j,book);
        }
        bookList.setUsedSize(currentSize-1);

 

5.运行案例 

 

 

 

 

6.源代码 

 

 Book类:

package book;
public class Book {
    private String name;//书名
    private String author;//作者
    private int price;//价格
    private String type;//书籍类型
    private boolean isBorrowed;//是否借出

    public Book(String name, String author, int price, String type) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", isBorrowed=" + ((isBorrowed==true) ?"已借出":"未借出")+
                '}';
    }
}

BookList类:

package book;
public class BookList {
    private Book[] books=new Book[10];
    private int usedSize;//有效的数据个数【实际放的书的个数】
    public BookList(){
        books[0]=new Book("三国演义","罗贯中",30,"小说");
        books[1]=new Book("西游记","吴承恩",40,"小说");
        books[2]=new Book("红楼梦","曹雪芹",50,"小说");
        this.usedSize=3;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(int pos,Book book) {
        this.books[pos] = book;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book[] getBooks(){
        return books;
    }
}

Main类:

package book;

import ioperation.IOPeration;
import user.Librarian;
import user.Reader;
import user.User;

import java.util.Scanner;

public class Main {
    public static User login(){
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您的姓名:   ");
        String name=scanner.nextLine();
        System.out.println("请输入您的身份,1.管理员  2.普通用户:   ");
        int choice=scanner.nextInt();
        if (choice==1){
            return new Librarian(name);
        }else if(choice==2){
            return new Reader(name);
        }else{
            return null;
        }
    }
    public static void main(String[] args) {
        BookList bookList=new BookList();
        User user=login();
        user.menu();
        int choice=user.menu();
        user.doIoperation(choice,bookList);
    }
}

AddOperation类:

package ioperation;

import book.Book;
import book.BookList;

import java.util.Scanner;

public class AddOperation implements IOPeration{
        public void work(BookList bookList){
            System.out.println("新增图书……");
            int currentSize=bookList.getUsedSize();
            if(currentSize==bookList.getBooks().length){
                System.out.println("书架满了,不能放了");
                return;
            }
            Scanner scanner=new Scanner(System.in);
            System.out.println("请输入书名:   ");
            String name=scanner.nextLine();
            System.out.println("请输入作者:   ");
            String author=scanner.nextLine();
            System.out.println("请输入书的类型:   ");
            String type=scanner.nextLine();
            System.out.println("请输入价格:   ");
            int price=scanner.nextInt();

            Book newbook=new Book(name,author,price,type);
            for (int i=0;i<currentSize;i++){
                Book book=bookList.getBooks(i);
                if(book.getName().equals(name)){
                    System.out.println("有这本书,不能增加");
                    System.out.println(book);
                    return;
                }
            }
            bookList.setBooks(currentSize,newbook);
            bookList.setUsedSize(currentSize+1);
            System.out.println("新增图书成功");
        }
}

BorrowOperation类:

package ioperation;

import book.Book;
import book.BookList;

import java.util.Scanner;

public class BorrowOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("借阅图书……");
        Scanner scanner=new Scanner(System.in);
        System.out.printf("请输入您借阅的书名:  ");
        String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        for (int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                if (book.isBorrowed()==true){
                    System.out.println("这本书已经被借出了");
                    return;
                }
                book.setBorrowed(true);
                System.out.println("借阅成功");
                return;
            }
        }
        System.out.println("没有你要借阅的这本书");
    }
}

DelOperation类:

package ioperation;

import book.Book;
import book.BookList;

import java.util.Scanner;
public class DelOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("删除图书……");
        Scanner scanner=new Scanner(System.in);
        System.out.print("请输入您删除的书名:  ");
        String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        int pos=-1;
        int i=0;
        for (;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                System.out.println("找到了这本书");
                pos=i;
                break;
            }
        }
        if (i==currentSize){
            System.out.println("没有你要删除的书");
            return;
        }
        //开始删除
        for (int j=pos;j<currentSize-1;j++){
            Book book=bookList.getBooks(j+1);
            bookList.setBooks(j,book);
        }
        bookList.setUsedSize(currentSize-1);
    }
}

ExitOperation类:

package ioperation;

import book.BookList;
public class ExitOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("退出系统……");
        System.exit(0);
    }
}

FindOperation类: 

package ioperation;

import book.Book;
import book.BookList;

import java.util.Scanner;
public class FindOperation implements IOPeration{
    public void work(BookList bookList){
    System.out.println("查找图书……");
    Scanner scanner=new Scanner(System.in);
    System.out.printf("请输入您的书名:  ");
    String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        for (int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                System.out.println("找到了这本书");
                System.out.println(book);
                return;
            }
        }
        System.out.println("没有你要找的这本书");
    }
}

IOPeration接口:

package ioperation;

import book.BookList;

public interface IOPeration {
    void work(BookList bookList);
}

 ReturnOperation类:

package ioperation;

import book.Book;
import book.BookList;

import java.util.Scanner;

public class ReturnOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("归还图书……");
        Scanner scanner=new Scanner(System.in);
        System.out.printf("请输入您归还的书名:  ");
        String name=scanner.nextLine();
        int currentSize=bookList.getUsedSize();
        for (int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            if(book.getName().equals(name)){
                if (book.isBorrowed()==true){
                    book.setBorrowed(false);
                    System.out.println("归还成功");
                    return;
                }

            }
        }
        System.out.println("没有你要归还的图书");
    }
}

 ShowOperation类:

package ioperation;

import book.Book;
import book.BookList;

public class ShowOperation implements IOPeration{
    public void work(BookList bookList){
        System.out.println("显示图书……");
        int currentSize=bookList.getUsedSize();
        for(int i=0;i<currentSize;i++){
            Book book=bookList.getBooks(i);
            System.out.println(book);
        }
    }
}

Librarian类:

package user;

import ioperation.*;

import java.util.Scanner;

public class Librarian extends User{
    public Librarian(String name) {
        super(name);
        this.ioPerations=new IOPeration[]{
        new ExitOperation(),
        new FindOperation(),
        new AddOperation(),
        new DelOperation(),
        new ShowOperation(),
        };
    }

    public int menu(){
        System.out.println("欢迎"+name+"来到图书管理系统");
        System.out.println("*******管理员菜单*******");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        System.out.println("***********************");
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您的操作:   ");
        int choice=scanner.nextInt();
        return choice;
    }
}

Reader类:

package user;

import ioperation.*;

import java.util.Scanner;

public class Reader extends User{
    public Reader(String name) {
        super(name);
        this.ioPerations=new IOPeration[]{new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }
    public int menu(){
        System.out.println("欢迎"+name+"来到图书管理系统");
        System.out.println("*******读者菜单*******");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0.退出系统");
        System.out.println("*********************");
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您的操作:   ");
        int choice=scanner.nextInt();
        return choice;
    }
}

User类:

package user;

import book.BookList;
import ioperation.IOPeration;

public abstract class User {
    protected String name;
    protected IOPeration[] ioPerations;
    public User(String name){
        this.name=name;
    }
    public abstract int menu();
    public void  doIoperation(int choice, BookList bookList){
        ioPerations[choice].work(bookList);
    }
}

 

🌈✨今天的分享到这里结束啦,小怡和大家一起进步一起学习。“没有人不喜欢聪慧而努力的人,所以,所有的老板都会青睐酸梅汤型员工。想当这样的员工不容易,重在时间的积累。快捷得不到成绩,只有在历练中才能收获一种有价值的甜”。 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1982127.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

跳妹儿学编程之ScratchJr(12):综合篇-五只小猴子床上跳

博主资深软件架构师&#xff0c;拥有13年大型软件与互联网系统开发、设计和架构经验&#xff0c;曾就职于华为&#xff0c;现任职于国内知名互联网公司。平时在家教咱家“跳妹儿”编程&#xff0c;并将心得和过程记录下来。希望可以帮助更多对编程感兴趣的家庭。 引言 在前面的…

略读ArrayList源码

ArrayList是Java集合框架中的一部分&#xff0c;底层是通过数组实现的&#xff0c;可以动态增长和缩减。 一、首先看成员变量 序列化ID定义。在Java中&#xff0c;如果一个类实现了Serializable接口&#xff0c;那么它的serialVersionUID就非常重要了。serialVersionUID用于确…

Cesium初探-CallbackProperty

在Cesium中&#xff0c;CallbackProperty 是一种非常有用的特性&#xff0c;可以用来动态更新实体的属性&#xff0c;如位置、方向、高度等。CallbackProperty 允许你在指定的时间点计算属性值&#xff0c;这样就可以实时地改变实体的状态而不需要频繁地重新设置整个属性。 下…

PCIe学习笔记(16)

层次结构&#xff08;Hierarchy&#xff09;ID Message &#xff08;PCIe I/O 互连的树形拓扑结构称为 PCIe 的 Hierarchy&#xff0c;或称层级、层次&#xff08;不是事务层、数据链路层的“层”&#xff09;。层次区域是指与 RC 某一 RP 相关联的所有设备和链路组成的线路结…

【Linux课程学习】:对于权限的理解(粘滞位)

&#x1f381;个人主页&#xff1a;我们的五年 &#x1f50d;系列专栏&#xff1a;Linux课程学习 &#x1f337;追光的人&#xff0c;终会万丈光芒 &#x1f389;欢迎大家点赞&#x1f44d;评论&#x1f4dd;收藏⭐文章 这篇文章主要理解权限的概念&#xff0c;以及如何更改…

CSS:图片间空白间距问题的解决方案

一、问题描述 今天有小伙伴遇到多张图片排版显示时中间存在空白间隙&#xff0c;问如何处理&#xff1a; <div> <img width"100%" src"https:/xxx.png" id"1747098" style"max-width:100%;"><img width"100%&qu…

学习进行到了第十七天(2024.8.5)

1.Mybatis的定义 数据持久化是将内存中的数据模型转换为存储模型&#xff0c;以及将存储模型转换为内存中数据模型的统称。例如&#xff0c;文件的存储、数据的读取以及对数据表的增删改查等都是数据持久化操作。MyBatis 支持定制化 SQL、存储过程以及高级映射&#xff0c;可以…

【leetcode详解】另一棵树的子树 (C++递归:思路精析 过程反思)

思路详解&#xff1a; 总体框架&#xff1a; 对root树进行先序遍历&#xff0c;如果当前结点&#xff08;记为cur&#xff09;的值和subRoot的根节点值相等时&#xff0c;就开始判断 以cur为根节点的树 和 子树 是否结构一样? 如何判断两棵树是否结构完全相同&#xff1f; …

Docker Remote API未授权访问漏洞

9.Docker Remote API未授权访问漏洞 步骤一:使用以下Fofa语句对Docker产品进行搜索. port"2375" 步骤二:直接使用浏览器访问以下路径 /version#查看版本信息 /info#查看容器信息 漏洞修复 1.端口访问控制 对2375端口做网络访问控制&#xff0c;如设置iptables…

人工智能时代程序员生存法则

随着AIGC&#xff08;如chatgpt、midjourney、claude等&#xff09;大语言模型接二连三的涌现&#xff0c;AI辅助编程工具日益普及&#xff0c;程序员的工作方式正在发生深刻变革。有人担心AI可能取代部分编程工作&#xff0c;也有人认为AI是提高效率的得力助手。面对这一趋势,…

什么是亚马逊测评?亚马逊测评的技术要求有哪些?

今天将深入探讨亚马逊测评&#xff0c;这一备受关注的轻资产创业项目&#xff0c;吸引了众多创业者的目光。为了帮助大家更好地理解亚马逊测评&#xff0c;将回答一些常见问题&#xff0c;并分享相关知识。 什么是亚马逊测评&#xff1f; 亚马逊测评是为亚马逊商家提供的一项…

2011-2023各省数字普惠金融指数数据(覆盖广度、使用深度和数字化程度)

2011-2023各省数字普惠金融指数数据 1、时间&#xff1a;2011-2023年 2、指标&#xff1a;数字金融普惠指数、数字金融覆盖广度指数、数字金融使用深度指数、普惠金融数字化程度指数、数字金融使用深度指数下属的支付、保险、货币基金、信用服务、投资、信贷等分类指数 3、范…

【MATLAB源码-第242期】基于matlab的OFDM+QPSK系统莱斯信道Ricain信道估计仿真采用LS方法,输出误码率曲线。

操作环境&#xff1a; MATLAB 2022a 1、算法描述 OFDM&#xff08;正交频分复用&#xff09;是一种广泛应用于现代通信系统的多载波传输技术&#xff0c;其主要优点包括高频谱效率、抗多径衰落和抵抗频率选择性衰落。OFDM系统通过将高速数据流分割成多个低速数据流&#xff…

javascript:检测图片的宽高

1 方案描述 JavaScript提供了非常方便的FileReader和Image对象&#xff0c;可以帮助我们轻松实现这个功能。具体步骤如下&#xff1a; 获取文件输入框&#xff1a;首先&#xff0c;我们需要获取到用户选择的文件。读取文件内容&#xff1a;然后&#xff0c;通过FileReader对象…

Servlet概念理解和具体实现

目录 1、C/S架构和B/S架构 &#xff08;1&#xff09;C/S架构 &#xff08;2&#xff09;B/S架构 &#xff08;3&#xff09;B/S架构的技术原理 &#xff08;4&#xff09;CS/BS区别 &#xff08;5&#xff09;B/S技术的工作原理 &#xff08;6&#xff09;什么是URL …

华杉研发九学习日记24 线程同步 死锁 线程通信 线程池 Callable接口

华杉研发九学习日记24 java多线程 一&#xff0c;线程同步 1.1 线程同步问题 多个线程同时操作一个全局数据或静态数据时可能会造成数据冲突 解决&#xff1a; synchronized同步代码块synchronized同步方法使用锁对象加锁解锁 // 火车站卖车票 -- 100张 public class…

Django ASGI服务

1. ASGI简介 在Django中, ASGI(Asynchronous Server Gateway Interface)的引入使得Django应用能够支持异步编程. 从Django 3.0开始, Django就增加了对ASGI的支持, 但直到Django 3.1才正式推荐在生产环境中使用ASGI. ASGI是一个用于Python的异步Web服务器的标准接口, 它允许你运…

图解RocketMQ之消息如何存储

大家好&#xff0c;我是苍何。 人一辈子最值得炫耀的不应该是你的财富有多少&#xff08;虽然这话说得有点违心&#xff0c;呵呵&#xff09;&#xff0c;而是你的学习能力。技术更新迭代的速度非常快&#xff0c;那作为程序员&#xff0c;我们就应该拥有一颗拥抱变化的心&…

西安交通大学先进动力与新能源发展峰会举行

8月3日&#xff0c;西安交通大学第十届先进动力与新能源发展峰会暨西安交大先进动力校友会2024年年会在深圳举行。西安交通大学党委常委、副校长单智伟&#xff0c;南方科技大学清洁能源研究院院长、创新创业学院院长、澳大利亚国家工程院外籍院士刘科&#xff0c;西安交通大学…

抑制电机噪声的又一神器 -- 三线共模电感

概述 针对电机产品&#xff0c;尤其是三相无刷电机&#xff0c;如图1&#xff0c;其噪声源主要是电机的开关驱动模块&#xff08;具体可参阅另一篇文章“”&#xff09;&#xff0c;而一般的等效天线即为连接电机与驱动板的电机线&#xff08;等效天线、四分之一波长的理论解释…