update:demo3

This commit is contained in:
dichgrem
2025-11-14 15:36:43 +08:00
parent d765c1a219
commit c20e8949a5
22 changed files with 310 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package com.study.demo3;
public class PrintedBook extends Book {
private int stock;
public PrintedBook() {
super();
}
public PrintedBook(String isbn, String title, int stock) {
super(isbn, title);
this.stock = stock;
}
public int getStock() {
return stock;
}
public void setStock(int stock) {
this.stock = stock;
}
@Override
public String toString() {
return "PrintedBook [ISBN=" + isbn + ", Title=" + title + ", Stock=" + stock + ", Available=" + available + "]";
}
}