Interface Component

All Known Implementing Classes:
ConcreteComponent, ConcreteDecoratorA, ConcreteDecoratorB, Decorator

public interface Component
The Component interface defines operations that can be dynamically modified.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the cost of the component.
    Gets the description of the component.
  • Method Details

    • getDescription

      String getDescription()
      Gets the description of the component.
      Returns:
      A string description.
    • cost

      double cost()
      Gets the cost of the component.
      Returns:
      The cost as a double.