You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
610 B

package cmpt213.assignment3.packagedeliveries.model;
import java.time.LocalDateTime;
/**
* It's a subclass of PackageInfo that adds an author field
*/
public class BookPackage extends PackageInfo {
String author;
public BookPackage(String name, String note, double price, double weight, boolean delivered, LocalDateTime expectedDate, String author) {
super(name, note, price, weight, delivered, expectedDate);
this.author = author;
this.setType("book");
}
@Override
public String toString() {
return super.toString() + "\nAuthor: " + author;
}
}