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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.