面向对象的分析与设计

发布于 2024-09-07 11:04:47 字数 248 浏览 6 评论 0 原文

我这些天正在做一个系统,实际上是我的第一个系统,我在做 OOAD 时遇到了麻烦,我需要你们所有人的帮助,我熟悉用 UML 绘制的图表,但是当给定一个场景时我无法制作一个链接,看不到它们的流程,比如现在我正在设计系统,我已经做了用例图和活动图,现在我发现很难根据情况来决定类?我找不到这些图之间的流程,当我完成上述两个图后,如何获得类图?我也不是 UML 方面的专家,只是熟悉图表?有人能解决这个问题吗?有教程建议吗?如何分析一个系统?我有什么问题吗?

问候, 兰加纳

i'm doing a system these days, my first one actually and i'm in trouble doing OOAD, i need some help from you all, i'm familiar with diagrams drawn in UML,but when given a scenario i can't make a link, can't see a flow of them, for example now i'm designing the system, i've done use case diagrams and activity diagrams and now i'm finding it very difficult to decide the classes according to the situation? i can't find a flow between these diagrams, how can i get class diagrams when i'm done with the above mentioned two diagrams? i'm not that much expert in UML either,just familiar with the diagrams? can some one solve the problem? any suggestion of tutorials? how to analyse a system? what is the problem with me??

regards,
Rangana

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

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

发布评论

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

评论(3

孤蝉 2024-09-14 11:04:47

如果您有这样的感觉,请不要从 UML 开始。从代码本身开始。从需求到设计始终是一个直观的飞跃,随着经验的积累(包括犯重大错误的经验,唉!),这会变得更加容易。有很多书籍可以帮助您更快地进步,但没有什么比实际的编码经验更能提高您的设计技能了。现在跳过类图,专注于代码:类图只是抽象细节的一种方式,以便传达程序的整体形状,有时甚至是传达给您自己!如果您不确定详细信息,请不要试图隐藏它们...

我推荐 Craig Larman 的 应用 UML 和模式作为从相当实用和集成的角度解决大多数软件设计生命周期的起点。还有很多其他书籍:检查 SO 上的问题,例如 面向对象书籍

If you feel like that, don't start with UML. Start with the code itself. Moving from requirements to design is always an intuitive leap, which gets much easier with experience (including the experience of making major mistakes, alas!). There are any number of books that can help you progress faster, but nothing beats actual coding experience to drive your design skills. Skip the class diagrams for now, and focus on the code: class diagrams are just a way of abstracting away details in order to communicate the overall shape of your program, sometimes to yourself! If you're unsure of the details, don't attempt to hide from them...

I'd recommend Craig Larman's Applying UML and Patterns as a starting point addressing most of the software design lifecycle, from a fairly practical and integrated perspective. There are plenty of other books out there: check SO for questions on e.g. general programming books and OO books.

浅唱ヾ落雨殇 2024-09-14 11:04:47

没有上下文的 UML 可能真的很难使用或受益。如果您开始创建项目并且不想只是“破解它”,那么为您的项目选择一种好的方法是个好主意。一旦找到合适的方法,就遵循它,它会告诉你需要做什么、出于什么原因,有时甚至是如何完成。例如,如果您选择了统一流程,这是一种基于 Rational Unified Process 的免费方法,由该方法和 UML 的作者完成,您将被指导如何使用 UML 图来支持您的开发流程。我建议为此目的阅读本书 - http://www .clearviewtraining.com/books/uml-2-and-the-unified-process

UML without context might really be hard to use or benefit from. If you are starting creating projects and you do not want to just "hack it", it is a good idea to choose a good methodology for your project. Once you find a suitable methodology, follow it and it will give you pointers what needs to be done, for what reason and sometimes even how to get it done. For example if you had chosen Unified Process, which is free methodology based on Rational Unified Process done by authors of that methodology and UML, you would be guided how to use UML diagrams to support your development process. I recommend reading this book for this purpose - http://www.clearviewtraining.com/books/uml-2-and-the-unified-process

妄想挽回 2024-09-14 11:04:47

如果您在识别真正的类别时遇到问题,请进行“名词分析” - 这将为您提供有关类别的提示。接下来进行“动词分析”,这就是类如何交互和关联的 - 这将帮助您了解类和子系统之间的关联和依赖关系。
参考bob叔叔网站的OOAD设计和相关文章
http://www.objectmentor.com/omSolutions/oops_what.html

If you are having a problem with identifying the real classes, then do "Noun analysis" - this will give you a hint on what are the classes going to be. Following that do "verb analysis" which is how the classes interact and relate - this will help you on associations and dependencies between classes and sub systems.
Refer to OOAD design and related articles from uncle bob's site
http://www.objectmentor.com/omSolutions/oops_what.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文