• Purpose of Analysis
• Stereotypes(套路) of classes
• Class relationships
Why “Analyse”
– Refining requirements. 精炼要求
Aim: precise understanding of requirements.
Conceptual modelling
A conceptual model aims to identify the individual concepts (classes) which exist within a problem domain.
-are described using UML Class diagrams.
It should show:
– Concepts (fundamental classes)
– Attributes of concepts
– Operations of concepts (leave details to the design stage)
– Associations between concepts
Analysis Class
always fit in one of 3 basic stereotypes
– Entity classes
– Boundary classes
– Control classes
Entity classes
– Used to model information that is long-lived and persistent
• Logical data structure
– Information that the system is dependent on.
– Store the data and define operations on the data.
• Search, update, load, save, etc.
Entity class example
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Entity(name = "CUSTOMER") //Name of the entity
public class Customer implements Serializable{
private long custId;
private String firstName;
private String lastName;
private String street;
private String appt;
private String city;
private String zipCode;
private String custType;
private Date updatedTime;
…
}
Boundary classes
-UI Design
– Used to model the interaction.
– Often involve receiving (presenting) information and requests from (and to) users and external systems.
• Deal with input and output, or connections with rest of system
– Normally represent abstractions of user/device interface: windows, forms, communication interfaces, printer interfaces, sensors, terminals, etc.
Control classes
– Used to encapsulate(封装) control and coordination of the main actions and control flows.
– Represent coordination, sequencing, transactions and control of objects.
– Deal with performing tasks,getting/setting data and coordinating behavior.
Examples
![](https://i-blog.csdnimg.cn/blog_migrate/316f682b8053038f24e73b4b7385b178.png)