[Note]港大-软件工程(Software Engineering)复习笔记

对于软件工程来说,最重要的是过程(process)


系统由三部分组成:

成分:Entities. Basic elements or constituents. relationships among abjects

环境:系统之外的东西

边界:划分环境与系统的边界线


sub-systems: Interactions between subsystems are called interfaces.



对象:独立的,可标记的项目,单元或实例,

类:对象的集合,集合内的对象拥有相同的结构,相似的属性,相同的行为,相似的关系,相同的语义。

(发现翻译成中文后好艰涩难懂)



UML DIagrams

Use case diagram

Class diagram

Interaction diagram

  • sequence diagram
  • communication diagram
  • timing diagram

Behavior diagram

  • state machine
  • activity diagram

Implementation diagram

  • component diagram
  • deployment diagram


Use case modelling

The process of modelling a system's function's in terms of business events, who initiated the events and how the system responds to the events.

Actors

  • An actor in a use case is an external agent that uses or interacts with the system
  • There is one one initiator actor and possibly other participating actors
  • An actor can be a user or a role, such as a person or an external system
  • It can also be a characteristic of the environmental, such as time ortemperature change

 Scenarios and Use Cases

  • A scenario is a behaviorally related sequence of steps, automated or manual, for the purpose of completing a business task
  • A use case is a collection of related scenarios, including normal and alternative scenarios
  • Not directly related to object technology



Temporal Event Use Cases

  • A temporal event is a system event that is triggered by time
  • The actor of a temporal event use case is time

Use Case Example

  • Put an elephant into the refrigerator
One use case, may be many scenarios and more steps
  • Put a giraffe into the refrigerator
One use case, may be many scenarios and more steps

Use Case Diagrm



We learn from mistakes

  • An analysis use case model should be device independent
  • An analysis use case is not an object
  • It is all right to have an initiating actor and a participating actor

Object Modelling

  • Object modelling is a technique for identifying classes within the systems environment and the relationships among these classes
  • Should be implementation independent
  • Class diagrams versus object diagrams (which are instance diagrams)
  • Object modelling invoves: 
  • A study of existing classes to see if they can be reused or adapted for new uses
  • Defining new or modified classes that will be combined with existing ones into a useful computing application

Class Diagrams

A class diagram is used to graphically depict the classes and their relationships

Classes

    

Objects (Instances)

 

Associations
  • A link is a physical or conceptual relationship between 2 or more objects
  • An association describes a group of links with common structure and common semantics
  • A link is an instance of an association



Multiplicities

  • The multiplicities between classes X and Y refers to the number of instances of X that will be present for a given instance of Y, and vice versa. 
  • Multiplicities are commonly referred to as 1:1, 1:M, M:1, M:M relationships
  • Also known as, cardinality constraints


We learn from mistakes



Sample UML Multiplicity Notations




Aggregations

  • Aggregation is a kind of association
  • Aggregations are also known as "is-part-of" relationships
  • Composition versus aggregation


Example of Composition




Example of (Shared) Aggregation



What are differences between aggregation, composition and dependency

Aggregation implies a relationship where the child can exist independently of the parent. Example: Class (parent) and Student (child). Delete the Class and the Students still exist.

Composition implies a relationship where the child cannot exist independent of the parent. Example: House (parent) and Room (child). Rooms don't exist separate to a House.

The above two are forms of containment (hence the parent-child relationships).

Dependency is a weaker form of relationship and in code terms indicates that a class uses another by parameter or return type.

Dependency is a form of association.


Inheritance



Message

  • A message is passed when one object invokes one or more of another object's operations to request information or some action
  • It is not a persistent relationship and not included in class diagrams.



Identify Actors and Use Cases


Construct Use Case Diagram

  • A use case diagram graphically depicts the system scope and boundaries
  • It represents the relationships between actors and use cases
  • The partitioning of system behavior into subsystems is important in defining the development strategy:Which use cases will be developed first and by whom

Document Use Case Normal Course of Events

  • The normal course of events is a step-by-step description starting with the actor initiating the use case until the end of the business events
  • For each use case identified, document its normal course of events

Use Case Relationships

Association
  • Instances of the actor and instances of the use case communicate with each other
  • The only relationship between actors and use cases
Include
  • An include relationship from use case A to use case B indicates that an instance of A will also contain the behavior as specified by B
Extend
  • An extend relationship from use case B to use case A indicates that an instance of A may be augmented (subject to specific conditions specified in the extension) by the behavior specified by B




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值