Package com.zybooks.dsaj.design
Interface Transportable
- All Known Subinterfaces:
Insurable
- All Known Implementing Classes:
BoxedItem
,BoxedItem2
public interface Transportable
Interface for objects that can be transported.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the item is hazardous.int
weight()
Returns the weight of the item.
-
Method Details
-
weight
int weight()Returns the weight of the item.- Returns:
- the weight of the item
-
isHazardous
boolean isHazardous()Returns whether the item is hazardous.- Returns:
- true if the item is hazardous, else false
-