Mid From PDF GoF Patterns Gang of Four Patterns

Element Interface (IShoppingCartElement):?

  • The IShoppingCartElement interface declares the Accept method, which allows

the element to accept a visitor. Each element (like Book, Fruit) will implement this

interface to allow a visitor to operate on it.
public interface IShoppingCartElement
{

void Accept(IShoppingCartVisitor visitor);

}

More from Design Patterns in C#

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details