Interface Product

All Known Implementing Classes:
ConcreteProductA, ConcreteProductB

public interface Product
The Product interface defines a common interface for all products that can be created by the factory method. This interface enforces a contract that all concrete products must implement the `use` method, which defines the behavior of the product.
  • Method Summary

    Modifier and Type
    Method
    Description
    use()
    Defines the behavior of the product.
  • Method Details

    • use

      String use()
      Defines the behavior of the product. Concrete products implement this method to provide their specific functionality or behavior.
      Returns:
      A string describing the product's behavior.