examples icon indicating copy to clipboard operation
examples copied to clipboard

ImmutabilityAndFactoryPattern/Cars Project - Code Failing

Open jdcortez5 opened this issue 5 years ago • 1 comments

There is two typos on the function below in the AbstractFactoryExample Module.

Private Function CreateSomeHondaCars(ByVal factory As ISimplerCarFactory) As Collection
'NOTE: this function doesn't know or care what specific ISimplerCarFactory it's working with.
    Dim cars As Collection
    Set cars = New Collection
    cars.Add factory.Create("Civic")
    cars.Add factory.Create("Accord")
    cars.Add factory.Create("CRV")
    Set CreateSomeCars = Collection 'should read Set CreateSomeHondaCars = cars
End Function

jdcortez5 avatar Jul 19 '20 01:07 jdcortez5

Thanks for the heads up! I won't be able to do this for a few days, feel free to PR in the meantime!

retailcoder avatar Jul 19 '20 20:07 retailcoder