views:

46

answers:

1

Hello.

I'm designing an application with UML. I have to represent video and image as a content of my application. I think both of them are files, one of type image and the other of type video.

How can I represent this on an UML model?

Thank you.

+1  A: 

Separately from the SE issue, I would challenge your assumption here. Are you sure that a file contains a single image? Are you sure that a video contains a single video? Are you sure that you can only display videos and images from files (rather than, say, a socket or a stream?)

In a UML class diagram, you could model a type for Content, with two subtypes: video and image.

You could separately model a file, and have subtypes for specific file types (or extensions). You could then model the relations between them, including containment. E.g., one video file is associated with one video.

Uri
I answer your questions: Are you sure that a file contains a single image? Image is a type, independently of what it contains (Maybe I don't understand your question). The same for the second question.Are you sure that you can only display videos and images from files (rather than, say, a socket or a stream? If video and image are types, I can add more types in future.
VansFannel
Maybe I'm modelling a database, isn't it? This is my first UML model and I don't know what I'm doing. I thought I was doing the application classes, not the database. Any advice about how to make the design of an application.
VansFannel
Are you talking about Inheritance?
VansFannel

related questions