Class ConcreteComponent

java.lang.Object
Structural.Decorator.ConcreteComponent
All Implemented Interfaces:
Component

public class ConcreteComponent extends Object implements Component
A ConcreteComponent provides the base implementation of the Component interface.
  • Constructor Details

    • ConcreteComponent

      public ConcreteComponent()
      Default constructor for ConcreteComponent.
  • Method Details

    • getDescription

      public String getDescription()
      Description copied from interface: Component
      Gets the description of the component.
      Specified by:
      getDescription in interface Component
      Returns:
      A string description.
    • cost

      public double cost()
      Description copied from interface: Component
      Gets the cost of the component.
      Specified by:
      cost in interface Component
      Returns:
      The cost as a double.