mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 20:42:00 -05:00
update:demo3
This commit is contained in:
30
com/study/demo3/EBook.java
Normal file
30
com/study/demo3/EBook.java
Normal 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 + "]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user