public void ClientMethod(IAbstractFactory factory) { IAbstractProductAccumulator productA = factory.CreateProductAccumulator(); IAbstractProductDisplay productB = factory.CreateProductDisplay(); Console.WriteLine(productB.UsefulFunctionDisplay()); Console.WriteLine(productB.AnotherUsefulFunctionDisplay(productA)); }
public string AnotherUsefulFunctionDisplay(IAbstractProductAccumulator collaborator) { var result = collaborator.UsefulFunctionAccumulator(); return($"The result of the Samsung Display collaborating with the ({result})"); }