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.
22 lines
688 B
22 lines
688 B
package cmpt213.assignment2.packagedeliveriestracker.model;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
* ElectronicPackage is a subclass of PackageInfo that adds a handlingFee attribute
|
|
*/
|
|
public class ElectronicPackage extends PackageInfo {
|
|
double handlingFee;
|
|
|
|
public ElectronicPackage(String name, String note, double price, double weight, boolean delivered, LocalDateTime expectedDate, double handlingFee) {
|
|
super(name, note, price, weight, delivered, expectedDate);
|
|
this.handlingFee = handlingFee;
|
|
this.setType("electronic");
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return super.toString() + "\nHandling fee: " + handlingFee;
|
|
}
|
|
}
|