程序逻辑的可视化表示 [英] Visual Representation of Program Logic

查看:218
本文介绍了程序逻辑的可视化表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于程序非常复杂,所以我想通过图表表示程序的逻辑。我需要一种方法来向其他人解释程序中为什么以及如何发生某些事情。流程图是唯一的选择吗?

I want to represent the logic of my program through a diagram, since the program is pretty complex; I need a way to explain to another person, why and how something happens in my program. Is flowchart the only option?

推荐答案

在UML中,使用不同的方法将不同的图用于不同的事物。考虑到我们倾向于依靠面向对象的方法,我将解释不同的图及其工作原理。

In UML, different diagrams are intended for different things, using different methodologies. Considering we tend to lean to the Object Oriented Methodologies, I will explain the different diagrams and how they work.


  • 用例图-用例模型的目的是识别和定义系统必须支持的所有基本业务流程。从用户和系统的角度来看。您可以在用例中使用系统中的任何单个操作,然后可以使用更多解释性模型。

  • Use Case Diagram - The point of use case models is to identify and define all of the elementary business processes that the system must support. This is from both a user and a system point of view. Any single action within your system can be used in a use case, which then will allow further more explanatory models to be used.

活动图-这是一种工作流图,用于描述用例图中发生的事情。基本上,这是一种描述一个或多个活动流程的可视化方法。

Activity Diagram - This is a type of workflow diagram used for describing what goes on in a use case diagram. It is basically a visual method to describe the flow of an activity, or multiple activities.

顺序图-这是一个图显示系统或进程中不同对象之间的通信。序列图在分析中很重要,因为它们对于详细的系统设计和用户界面设计至关重要。我真的很喜欢这些,因为它们可以很好地了解系统中正在发生的事情。

Sequence Diagram - This is a diagram to show communication between different objects in a system, or a process. Sequence diagrams are important in analysis, as they become crucial for detailed system design and user interface design. I really like these as they give a fantastic view of what is happening in the system.

状态机图-这使您可以跟踪对象在其整个生命周期中的状态,从而可以深入了解对象是如何工作的。这提供了如何在系统中有效地映射事件等的功能。

State Machine Diagram - This allows you to track the states of objects throughout their lifetime, which gives great insight into how objects are meant to work. This gives the ability on how to map events and the like effectively in the system.

使用上述图表可以得出这是进行分析和设计的重要基础,并且应注意,一旦创建了这些图,它们就不一定是完整的。在设计过程中,您将随着系统的发展更改这些图。我希望这可以帮助你。以下是提到的不同图表的Wikipedia链接。

Using the above mentioned diagrams gives a great basis for analysis and design, and one should note that once these diagrams are created, they are not necessarily complete. In design processes, you will alter these diagrams as the system evolves. I hope this helps you. Below are links to wikipedia for the different diagrams mentioned.

用例图

活动图

序列图

状态机图

这篇关于程序逻辑的可视化表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆