开发者

Software engineering: an image and a video is a file [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

Improve this question

I'm de开发者_高级运维signing 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜