Class PerishableItem
(The Advanced Product) This class extends Snack
It introduces a java.util.Date property for an expiration date
It overrides the isExpired() method from the base class
to check if today's date is past the item's expiration date
-
Constructor Summary
ConstructorsConstructorDescriptionPerishableItem(String name, double price, boolean isVegan, Date expirationDate) Class constructor for perishable item -
Method Summary
-
Constructor Details
-
PerishableItem
-
-
Method Details
-
isExpired
-
displayDetails
- Overrides:
displayDetailsin classSnack
-