课堂图的课程UML

发布于 2025-02-03 02:59:10 字数 561 浏览 2 评论 0 原文

我目前正在研究一个示例设计图书馆管理系统的课程图。

但是,我对这个示例感到困惑: ”“在此处输入图像说明”

我真的无法理解创建两个类的目的: book and book item item 。 我难道难道难道不只是从 book item 类插入 book> book 类,而只保留两个类别的一个类?

I am currently studying an example from an online course to design a class diagram for a Library Management System.

However, I am confused with this example: enter image description here

I can't really understand the purpose of creating two classes: Book and Book Item.
Couldn‘t I just insert attributes from Book Item class into the Book class and keep only a single class of the two?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝眼睛不忧郁 2025-02-10 02:59:10

这是一个有趣的示例:

  • book 是指发布者或库的目录中的一本书。它有一个ISBN可以唯一地识别它,标题,作者等。
  • bookitem 是指该书的副本,该副本由图书馆拥有并借给用户。

但是此示例需要改进:

This is an interesting example:

  • The Book refers to an book in the catalogue of the publisher or the library. It has an ISBN to uniquely identify it, a title, an author and so on.
  • The BookItem refers to a copy of that book that is owned by the the library and is lend to the users.

But this example requires improvements:

  • the model should prefer composition over inheritance., which in UML translates tonprefering a simple association over a specialization. Several BookItems may refer to the same Book, and the model does not capture this reality.
  • The boundaries between book and book items need to be reviewed. For example the BookFormat (only in item) may in reality influence the number of pages (in book). Moreover a publishing date seems not to be specific to a book item but general to the book. Printing date could change on each item.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文