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,30 @@
package com.study.demo3;
public class EBook extends Book {
private double fileSize;
public EBook() {
super();
}
public EBook(String isbn, String title, double fileSize) {
super(isbn, title);
this.fileSize = fileSize;
}
public double getFileSize() {
return fileSize;
}
public void setFileSize(double fileSize) {
this.fileSize = fileSize;
}
@Override
public String toString() {
return "EBook [ISBN=" + isbn + ", Title=" + title + ", FileSize=" + fileSize + "MB, Available=" + available + "]";
}
}