Package Structural.Decorator
Class ConcreteComponent
java.lang.Object
Structural.Decorator.ConcreteComponent
- All Implemented Interfaces:
Component
A ConcreteComponent provides the base implementation of the Component interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecost()Gets the cost of the component.Gets the description of the component.
-
Constructor Details
-
ConcreteComponent
public ConcreteComponent()Default constructor for ConcreteComponent.
-
-
Method Details
-
getDescription
Description copied from interface:ComponentGets the description of the component.- Specified by:
getDescriptionin interfaceComponent- Returns:
- A string description.
-
cost
public double cost()Description copied from interface:ComponentGets the cost of the component.
-