1、通过数组来进行存储
2、通过循环遍历来查找下标是否一致,从而进行对图书的添加,归还,删除,修改
3、 //获取当前系统的日期对象
LocalDate nowDate = LocalDate.now();
//获取借出日期字符串
String rentDateString = Date[index];
//构建一个日期对象格式化实例
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
//传递参数按照给定的格式化对象解析给定的日期字符串,返回日期对象
LocalDate rentDateObj = LocalDate.parse(rentDateString, formatter);
//创建日期间隔实例
Period betweenPeriod = Period.between(rentDateObj, nowDate);
//获取两个日期之间间隔的天数
int days = betweenPeriod.getDays();
package com.cd;
import java.time.LocalDate;
import java.time.Period;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;
public class BookRent {
static Scanner scanner = new Scanner(System.in);
static int []isbn; //国际编号
static String []title; //书名
static String []author; //作者
static int store; //库存
static double []price; //价格
static boolean []Status;//状态
static String []Date; //日期
public static void main(String[] args) {
store = 100;
isbn = new int[store];
title = new String[store];
author = new String[store];
price = new double[store];
Status = new boolean[store];
Date = new String[store];
//初始化数据
isbn[0] = 123;
title[0] = "三个火枪手";
author[0] = "大仲马";
price[0] = 52.5;
Status[0] = false;
Date[0] = null;
isbn[1] = 256;
title[1] = "海底两万里";
author[1] = "儒勒·凡尔纳";
price[1] = 35.5;
Status[1] = true;
Date[1] = "2021年07月04日";
isbn[2] = 456;
title[2] = "童年";