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
694 B
22 lines
694 B
2 years ago
|
package cmpt213.assignment4.packagedeliveries.webappserver.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;
|
||
|
}
|
||
|
}
|