Class ConcreteProductB

java.lang.Object
Creational.FactoryMethod.ConcreteProductB
All Implemented Interfaces:
Product

public class ConcreteProductB extends Object implements Product
Concrete implementation of the Product interface. ConcreteProductB represents a specific type of product that implements the behavior defined in the Product interface. It provides a unique implementation for the `use` method.
  • Constructor Details

    • ConcreteProductB

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

    • use

      public String use()
      Implements the behavior for ConcreteProductB. This method returns a string that describes the behavior of ConcreteProductB when used.
      Specified by:
      use in interface Product
      Returns:
      A string indicating the specific behavior of ConcreteProductB.