You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the access modifier of the CreatePizza method in SimplePizzaStoreBase should be changed to protected because only the concrete classes of SimplePizzaStoreBase should be aware of it. In other words, we shouldn't expose CreatePizza to customers who come to the pizza store to order pizza. Therefore, it should be changed to:
I think the access modifier of the CreatePizza method in SimplePizzaStoreBase should be changed to protected because only the concrete classes of SimplePizzaStoreBase should be aware of it. In other words, we shouldn't expose CreatePizza to customers who come to the pizza store to order pizza. Therefore, it should be changed to:
protected abstract IPizza CreatePizza(PizzaTypeEnum pizzaType);
And obviously, in their concrete classes:
protected override IPizza CreatePizza(PizzaTypeEnum pizzaType)
=> _factory.CreatePizza(pizzaType);
The text was updated successfully, but these errors were encountered: