package cn.vscoder.experiment_3.book;

public class Book {
    /* 定义类的5个成员变量：书号、书名、作者、出版社、定价*/
    public String ISBN;                //存储国际标准书号
    public String bookName;      //存储书名
    public String author;             //存储作者
    public String publisher;        //存储出版社
    private double  price;             //存储书的定价

    public Book(String ISBN, String bookName, String author, String publisher, double price) {
        this.ISBN = ISBN;
        this.bookName = bookName;
        this.author = author;
        this.publisher = publisher;
        this.price = price;
    }

    public String getISBN() {
        return ISBN;
    }

    public String getBookName() {
        return bookName;
    }

    public String getAuthor() {
        return author;
    }

    public String getPublisher() {
        return publisher;
    }

    public double getPrice() {
        return price;
    }

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

    @Override
    public String toString() {
        return "图书信息：" +
                "ISBN='" + ISBN + '\'' +
                ", 书名='" + bookName + '\'' +
                ", 作者='" + author + '\'' +
                ", 出版社='" + publisher + '\'' +
                ", 定价=" + price;
    }
}
