You are building an email marketing recommendation engine for a ticketing marketplace.
The marketplace has many users and many events. The engine should select which events are relevant to each user and send recommendation emails. The design should be extensible because product managers will frequently add new recommendation rules.
Requirements:
-
Define basic data models for
User
and
Event
.
-
Implement an
EmailMarketingEngine
that takes a list of recommendation strategies and uses them to decide which users should receive which event recommendations.
-
Implement at least the following strategies:
-
Recommend events in the same city as the user.
-
Recommend events whose ticket price is below
$50
.
-
Assume event prices are retrieved through a separate
PriceService
rather than stored directly on the event.
-
The design should make it easy to add future strategies, such as location distance, user interests, past purchases, event popularity, or personalized ranking.
-
Show how the engine can be configured with multiple strategies, for example: city-based recommendation plus price-based recommendation.
Discuss the object-oriented design, interfaces, responsibilities, and how you would test the solution.