views:

41

answers:

1

Hello.

I'm designing a software. I want to store the times a user visits a place, and I want to show a visit history for that user or place.

I think, visit is a class, and visit history, is it a class? I don't know how to represent visit history on my UML model.

Thank you.

+2  A: 

Visit history is merely a collection of visits in the past. You could represent a GetVisitsBetweenDates(DateTime start, DateTime end) method on the visit class.

David Neale
And how can I obtain the number of visitors of a place? It can be so slow to check all users to identify who of them has visited the place.
VansFannel
Is it necesary represent visit history on UML model?
VansFannel
How you get the data is down to the implementation code. Assuming this data is stored in some type of relational database system it shouldn't be heavy on performance to find that out. And so far as whether it should be represented, yes it should but only as a method to return a collection (although if you manually create a custom collection class then that should also be in the model).
David Neale
Ok, I understood.
VansFannel

related questions