Class Item
java.lang.Object
Item
(The Blueprint) This is the abstract base class
It defines the universal properties every product
has (a name and a price) and forces all child classes
to create their own version of a displayDetails() method
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Item
Class constructor for item- Parameters:
name- name of itemprice- price of item
-
-
Method Details
-
getName
-
getPrice
public double getPrice() -
isExpired
public boolean isExpired() -
displayDetails
-