Design a City Tourist Spots Guide
Model the cities, categories, and tourist spots of a city-guide app, then design search, details, and staff updates around them.
For this exercise, assume a city-guide mobile app lists the tourist spots of the cities it covers. Staff of the app register each spot under exactly one city and one category from a fixed list (for example museum, park, landmark, or food market); a spot's city never changes.
A spot has an ID that the app assigns and never reuses, a name, a short description, a location (latitude and longitude), a weekly opening schedule with at most one opening interval per weekday (an interval never crosses midnight, and a day without one is closed), and an entry fee that may be zero.
Among the active spots of one city, names are unique when letter case is ignored.
A traveler can: (1) list the covered cities; (2) search one city's active spots, optionally by category, by text that appears in the name (ignoring case), by free entry only, and by being open at a chosen weekday and time of day (open from the opening time up to, but not including, the closing time); results are ordered by name, show each spot's ID, name, category, and fee, and come in pages of 20; (3) open one spot's details by ID.
Staff can register a spot, change a spot's details, and retire a spot; retiring is final, and a retired spot no longer appears in searches.
An unknown city, an unknown category, a duplicate name, a schedule whose closing time is not after its opening time, and a negative fee each return a clear result; opening a retired spot's ID says it is retired, which differs from an unknown ID; a search with no matches returns an empty page.
Design the objects, their responsibilities, the interfaces, and the interactions. No code is needed. Follow-ups add new filters and orders, and have staff change spots while travelers page through results.
Maps and routes, distances, ratings and reviews, tickets and bookings, user accounts, photos, languages, and storage and scaling are out of scope.