Class Perishable
java.lang.Object
cmpt213.assignment4.packagedeliveries.webappserver.model.PackageBase
cmpt213.assignment4.packagedeliveries.webappserver.model.Perishable
- All Implemented Interfaces:
Package,Comparable<PackageBase>
A concrete implementation
PackageBase, models a package that
holds a perishable. Contains extra field that is a LocalDateTime object, acts as expiry date.-
Field Summary
Fields inherited from class cmpt213.assignment4.packagedeliveries.webappserver.model.PackageBase
dateFormat, expectedDeliveryDate, isDelivered, name, notes, price, weight -
Constructor Summary
ConstructorsConstructorDescriptionPerishable(String name, String notes, double price, double weight, LocalDateTime deliveryDate, LocalDateTime expiryDate) Constructor of the Perishable object. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the expiry date.toString()Converts object's fields into a String that conveys what the fields are (units are included).Methods inherited from class cmpt213.assignment4.packagedeliveries.webappserver.model.PackageBase
compareTo, getExpectedDeliveryDate, getName, getNotes, getPrice, getWeight, isDelivered, setDeliveryStatus
-
Constructor Details
-
Perishable
public Perishable(String name, String notes, double price, double weight, LocalDateTime deliveryDate, LocalDateTime expiryDate) Constructor of the Perishable object.- Parameters:
name- SeePackageBase(String, String, double, double, LocalDateTime)notes- SeePackageBase(String, String, double, double, LocalDateTime)price- SeePackageBase(String, String, double, double, LocalDateTime)weight- SeePackageBase(String, String, double, double, LocalDateTime)deliveryDate- SeePackageBase(String, String, double, double, LocalDateTime)expiryDate- Holds the perishable's expiry date.
-
-
Method Details