Human Computer Interface 简明教程
Object Oriented Programming
Object Oriented Programming Paradigm (OOPP)
面向对象的编程范式在人机界面中起着重要作用。它具有不同的组件,这些组件采用现实世界的对象并对它们执行操作,从而使人机之间产生实时交互。以下是 OOP 的组件 −
The Object Oriented programming paradigm plays an important role in human computer interface. It has different components that takes real world objects and performs actions on them, making live interactions between man and the machine. Following are the components of OOPP −
-
This paradigm describes a real-life system where interactions are among real objects.
-
It models applications as a group of related objects that interact with each other.
-
The programming entity is modeled as a class that signifies the collection of related real world objects.
-
Programming starts with the concept of real world objects and classes.
-
Application is divided into numerous packages.
-
A package is a collection of classes.
-
A class is an encapsulated group of similar real world objects.
Objects
现实世界中的对象有两种特征——它们都有状态和行为。让我们看看以下图片示例以了解对象。
Real-world objects share two characteristics − They all have state and behavior. Let us see the following pictorial example to understand Objects.
在上面的图表中,对象“狗”同时具有状态和行为。
In the above diagram, the object ‘Dog’ has both state and behavior.
对象将信息存储在属性中,并通过方法披露其行为。现在让我们简要讨论面向对象编程的不同组件。
An object stores its information in attributes and discloses its behavior through methods. Let us now discuss in brief the different components of object oriented programming.
Data Encapsulation
通过对象的隐藏类实现细节对用户,称为数据封装。在面向对象编程中,它将代码和数据绑定在一起,并保护它们免受外界干扰。
Hiding the implementation details of the class from the user through an object’s methods is known as data encapsulation. In object oriented programming, it binds the code and the data together and keeps them safe from outside interference.
Public Interface
软件实体在单个计算机或网络中互相交互的点称为公共接口。这有助于保护数据。通过仅使用对外界公开的公共接口公开的方法,其他对象可以在交互中改变对象的状态。
The point where the software entities interact with each other either in a single computer or in a network is known as pubic interface. This help in data security. Other objects can change the state of an object in an interaction by using only those methods that are exposed to the outer world through a public interface.
Class
类是一组具有相互方法的对象。它可以看作用于创建对象的蓝图。
A class is a group of objects that has mutual methods. It can be considered as the blueprint using which objects are created.
类是无源的,它们不相互通信,但可用于实例化相互交互的对象。
Classes being passive do not communicate with each other but are used to instantiate objects that interact with each other.
Object Oriented Modeling of User Interface Design
面向对象界面将用户与用于设计目的的真实世界操纵软件对象结合起来。让我们看下图表。
Object oriented interface unites users with the real world manipulating software objects for designing purpose. Let us see the diagram.
界面设计努力通过交互任务和操纵来帮助用户成功实现目标。
Interface design strive to make successful accomplishment of user’s goals with the help of interaction tasks and manipulation.
在创建用于界面设计的 OOM 时,首先会对用户需求进行分析。设计指定了每个对话框所需的结构和组件。然后,根据用例开发和测试界面。例如——个人银行应用。
While creating the OOM for interface design, first of all analysis of user requirements is done. The design specifies the structure and components required for each dialogue. After that, interfaces are developed and tested against the Use Case. Example − Personal banking application.
然后,分析每个用例记录的流程序列,以找出关键对象。这会生成对象模型。关键对象称为分析对象,显示这些对象之间的关系的任何图表称为对象图。
The sequence of processes documented for every Use Case are then analyzed for key objects. This results into an object model. Key objects are called analysis objects and any diagram showing relationships between these objects is called object diagram.