Current location - Training Enrollment Network - Books and materials - Kneel down! ! ! ! Online book sales system (ASP.net+ACCESS or SQL SERVER)
Kneel down! ! ! ! Online book sales system (ASP.net+ACCESS or SQL SERVER)
Object-oriented modeling of UML

Liu Wu Qingjiang

Computer Department, School of Information, Huaqiao University, Quanzhou, Fujian. "**)

Unified modeling language+&; (,is an object-oriented modeling language-this paper briefly introduces the modeling mechanism of&(and takes &;). (

The actual model of online book sales system is built for this tool, and its application is briefly demonstrated. The idea and process of modeling.

Keywords unified modeling language object-oriented system analysis and design

*, introduction

Object-oriented analysis and design +../0 1 follows the traditional procedural procedures.

After the design, another major change in the development of software technology. object-oriented programming

A new system design model is put forward, and he regards the system as an interaction.

A collection of tasks, each of which manages data in its own way. Harmony and unification

Modeling language &; 234356 '7658329 (:29; : 95 abbreviation &; () This is the orientation.

Like the ultimate in programming. It is a method of standardization and visualization of system software.

Construction and modeling representation of. Among them, graphic markup is especially suitable for object-oriented.

Software design represents the development direction of object-oriented software development technology.

This paper discusses &; On the basis of object-oriented modeling, we use&; For sb

An online book sales system is modeled by object-oriented method, and its use case diagram and class are given.

Diagram, sequence diagram, cooperation diagram and state diagram, and the key points of creating these diagrams are analyzed in detail

And the process, I believe for&; A: It is necessary to develop an object-oriented system.

The guiding significance of.

! Unified Modeling Language (&; () Overview

& (is a universal standard modeling language-it describes the system as discrete.

Decentralized interactive objects eventually provide a certain functional model for external users.

Type structure. It is suitable for any system with static structure and dynamic behavior.

Object-oriented modeling. Static structure defines the types of important objects in the system.

Sex and operation and the relationship between these objects, while dynamic behavior defines rights.

The temporal characteristics of images and the mechanism by which objects communicate with each other to achieve their goals.

Unified modeling language &; Composed of various related graphics, why?

Scientists describe the static structure and dynamic behavior of a system. These figures can be divided into

Two types

The first is static graph+= >; :& gt3? 63:9@:A, representing the static characteristics of the system, describes.

The structure and responsibilities of the system are described. Mainly used to describe the physical elements existing in the system.

Among them, the most important are use case diagram and class diagram. Use case diagrams are from the user's point of view.

Describe the system functions and point out the operator of each function. The class diagram describes the classes in the system.

Static relationship. It not only defines the classes in the system, but also shows the relationships between classes.

Union, dependence, aggregation, etc. -It also includes the internal structure of the class+the properties and operations of the class.

The second category is dynamic graph+1B2:A3? 63:9@:A, representing the dynamic characteristics of the system.

Describes the interaction between structural elements in a static diagram, which is mainly used to specify satisfaction.

The cooperative relationship between the behavioral elements of system requirements. Among them, the most important ones are sequence diagram and association.

Drawing and state diagram. Sequence diagram shows the dynamic cooperative relationship between objects-it is powerful.

Adjust the time sequence of message sending between objects-display the interaction between objects at the same time.

Similar to sequence diagram-collaboration diagram describes the collaborative relationship between objects, focusing on object interaction.

Spatial layout also shows the dynamic cooperative relationship between objects. These two figures are collectively called intersection.

Mutual graph+D2 > 5@:? & gt3E5 63:9@:A, * * * describes the interaction between objects. situation

A transition bar that describes all possible states of an object of a class and the state when an event occurs.

Pieces. Usually, the state diagram is a supplement to the class diagram.

From the application point of view-when we use object-oriented technology to design the system-

The first step is to describe the system requirements; Secondly, the static model of the system is established according to the requirements.

Type-Build the structure of the system; The third step is to describe the behavior of the system. If we adopt

Using &, modeling this process is object-oriented, which is in the first step and the first step.

The model established in these two steps is static-including use case diagram, class diagram and deployment diagram.

Wait a minute. Is a standard modeling language &; Static modeling mechanism of "(". And in the third step,

The established model can not only be executed, but also represent the time sequence state or interaction in the execution process.

Relationship. It includes sequence diagram, collaboration diagram and state diagram-it is a standard modeling language.

Dynamic modeling mechanism of&().

$,online book sales system &; (modeling

With the advent of e-commerce era, in order to adapt to the fierce market competition,

Demand, its traditional business process has been transferred to D2>;; 5 @ 25> to expand it.

Scope of business, to provide better services to customers. So how to build an extensible

A flexible and robust e-commerce system plays an important role in the success of enterprises.

Played a vital role. Based on this requirement and the above &; Discussion modeling, Ben

This paper intends to establish an online book sales system, using &; Face it.

Design and analysis of object. I hope to design an object-oriented e-commerce system.

It can be used for reference to some extent.

$F * Build a use case model

The first step of analysis is to point out what the system can be used for and who will make it.

Use it. These are called roles (:? & gt7@G) and use cases (; G5? G5G). The role is on you.

People or other systems outside the system where they work. The use case is that the user is due to some external factors

A hand between the incident department and the computer. Through the division of user needs

Analysis, we get the use case diagram of online book sales system:

Figure * Use case diagram of online book sales system

The system has many different roles and use cases. Definition basis of each role

Different interactions between it and the system. System administrator is the function of software system.

Users, mainly responsible for the user management of the system; Customers, suppliers and managers are systems.

Specific users use the system to achieve different functions. Time role timing

Trigger sales situation analysis and generate relevant reports to help managers sell.

Decision analysis. Every use case in the online book sales system is used to express.

Interaction between roles and systems. Each use case is accompanied by a text document describing

Examples and details of customer interaction. Because the system has many use cases-we only use the order office.

Take the use case as an example and give a detailed description of the use case:

& ampH+ 2: Order Processing Use Case

Use Case Name: Processing Orders

Use case description:

Enable this use case when creating (initializing) or querying an order. It is responsible for handling

From the initial definition of management order, it covers all aspects of order receiving and processing.

The first person to receive the final offer.

Participants: customers

Prerequisite: the customer logs in to the system to purchase.

Post-condition: the order enters the system, and the supplier is notified to deliver the goods, so as to reduce the inventory.

Main path: customers choose a commodity to place an order and pay by credit card.

Detailed description of the main path:

! "#" $ year Fujian computer first! period

Step description

% system confirms customer.

# For each product the customer needs:

# & amp% Get the required goods' (and product description

# & amp# Number of products required

# & amp! Calculate unit price

! Calculate the total order amount

Calculate the extra cost (including tax and transportation)

) Report the final price to the customer.

* Customer provides credit card number.

+Verify the customer's credit card.

Make a list of goods

-Close the sale

Abnormal path:

# The customer used a credit card to place an order, but the credit card was invalid.

# The customer ordered, but the required goods were out of stock.

! & #./0 Static Modeling

Use case diagrams only consider what functions the system should provide, but for these functions,

Regardless of the internal operation of the system, in order to reveal the internal relationship of the system, it is necessary to establish

Static structural model of vertical system. Static structure is from the internal structure of the system and static

Angle to describe the system, it defines the objects and classes in the system, and their internal.

And the relationship between them, such as association, aggregation and dependence. Inch /0, systematic

The static structure is mainly described by class diagram 123455 674894: Class diagram design is pair-oriented.

Like the core technology of the method, the implementation of use cases is specific to each class through class diagrams, from

And complete the process of design refinement. Because the class diagram is the central diagram of the whole system,

Is the basis for defining other graphics. This paper will give some examples of online book sales system.

Figure.

Figure # Local Class Diagram of Online Book Sales System

The local class diagram explains in detail the key classes in the online book sales system and their

The connection between. Each class in the diagram consists of three parts, and the top level includes the class name.

It is said that the middle layer is the property of the class and the bottom layer is the method of the class. The straight line between classes is

Class association defines the message passing path between classes and illustrates the pairing of a class.

Such as how to connect to objects of another class. In this partial class diagram, in addition to the general customs,

Besides association, it also includes the following relationships:%) Compound association: Compound means any department.

All points belong to a whole, and the order class (

There is a compound correlation between them. In the complex, if the whole is destroyed, a part of it will also be destroyed.

Destroy. # ; Link Association: A link is a runtime version of an association. Address class (? ((9=55) and

Customer classes (2@5AB:=9) are linked, and their associated class is role class (CB3=).

For example,? ((9=55) An instance of this class may contain two customers. Actual place of shipment

Address, but also includes the payment address of customer d. Then the instance object of class 2@5AB: =9

Then it is associated with the correct address instance object according to different association roles. ! ) reflexive

Association: Association established between two objects of a class. Books (DBBE)

This paper introduces a kind of reflexive association, which can be used to recommend some products when customers buy them.

Related books. $) Generalization: The relationship between superclass and subclass is defined. In the book

(DBBE) There are also computer books, economic books and literature books.

In the generalization relation, the DBBE class is a general class, while the other three classes are DBBE.

Specialization of class. Some general methods defined in the DBBE class are valid for all special classes.

Applicable. All these relationships define the key categories of online book sales system.

How to form a whole to play its function.

! & #./0 Dynamic modeling

Dynamic modeling mainly describes the interaction between system objects and the exchange of messages.

In other words. /0 provides four dynamic models in the form of graphics, and provides responses from a dynamic point of view.

Use different views of the program. It mainly includes interaction diagram (sequence diagram and collaboration diagram) and state diagram.

And activity diagram.

Interaction diagram is the most important form because it is a system.

The interaction between column objects is modeled, which can help us capture the elimination of transfer between objects.

Information, master the system control process across multiple objects. To do this, we will use. /0 payment.

Mutual graph is used to describe the communication between objects in online book sales system, so as to build

Dynamic model of the system. Interactive views can be represented by two kinds of diagrams: sequence diagram and collaborative diagram.

Figure, they each have different emphasis. Sequence diagram is used to describe the dynamic intersection between objects.

Correlation f focuses on the time sequence of message delivery between objects. Collaboration diagram is used to describe

The organization and distribution of objects that send and receive messages, focusing on the spatial distribution of object interaction.

Bureau.

In general, sequence diagrams can be composed of previously established class diagrams and detailed descriptions of use case paths.

Through the class diagram of online book sales system and its order processing,

Analyze the detailed path (main path) of the use case and get the order of the online book sales system.

Processing sequence diagram is as follows:

Figure! Order outsourcing sequence diagram of online book sales system

Sequence diagrams force us to pay attention to good object-oriented design concepts.

Let's go With the emergence of message sending mode, we need to apply some reasonable directional pairs.

It's like a design conference. When generating the order processing sequence diagram, we found that the order processing sequence diagram is composed of order classes.

(& lt9(=9) A class that does not meet the object-oriented design by calculating the maintenance cost should

The requirements of loose coupling and high clustering. To this end, we create a new class (2G498=) to manage.

Manage rates and provide special algorithms to calculate various expenses. At the same time, we also found that by

Order category (

Use interface class 249 ('>; A=9H4I= Get the verification credit card J437 (4a = 249 (1; News.

Collaboration diagrams can be generated directly from sequence diagrams. Its content focuses more on actual rights.

Image and its function in interaction, not a linear time flow represented by sequence diagram. cooperate

Drawing provides a perspective that shows the busyness of an object: sending a message, receiving it and canceling it.

Interest, or both. The following figure is the collaboration diagram of the main path of order processing.

Figure _ Online Book Sales System Order Processing Collaboration Diagram

Like most object-oriented technologies. The /0 dynamic model uses state diagrams to

Modeling the life cycle of a class and describing a specific object.

All possible states and events leading to a state transition. under normal conditions

Many classes have no interesting state to pay attention to, so they don't need to be established.

State diagram. For example, the customer class (2@5AB:=9) in the online book selling system is not needed.

Use state diagram to model it. While others are interesting and complicated.

Dynamic behavior can help us better understand its state by drawing a state diagram for it.

Related operations performed during the conversion process. For example, subscriptions in online book sales systems.

Single category (

The influence of many different events in the system. To this end, we provide an order class (

State diagram to track the whole process from birth to death. 1 Down to the first place! ! Page;

Fu! “# year $ phase to build a computer $ $

refer to

% & Xiao, Wu, Hu Chunlin () *+Principle and Technology. Beijing: Beijing University of Posts and Telecommunications Press! ""!

% ! Sun, Mao. ) *+Technology (Beijing: People's Posts and Telecommunications Publishing House! ""!

Wu Yanwen, Zheng Dali, Zhong Zhaowei (Optical Network Survivability Technology) (Beijing: Beijing University of Posts and Telecommunications Press, ""!

Gu, (Optical Fiber Communication System) (Beijing: Beijing University of Posts and Telecommunications Press, ""!

% , ' -./0 1/2345.672789 0 1/ :/74; 74; & lt748 1 & lt; 9./=75.34 >; 23748.4345. 10 748./4387 1436 )*+ ? 38 @ 9 34 & gt2A687? 6.b 9.587 149(CDE & lt; D F.5( G(! & amp“& amp( ! """

refer to

% & amp% America ' g . 767/-3; . & lth14.9 Egi Object-Oriented Design Basis (Science Press (! ""$

% ! % USA' j/37; I3/234 Yao translated Introduction to Object-Oriented Analysis and Design and Pattern Application (Machinery Industry Press (! ""!

% $' quarter (system analysis, design and application cases) (People's Posts and Telecommunications Press (! ""$

% #' Wang (Application of Technology in Practical Engineering) (Computer Engineering and Application (! ""!

0000000000000000000000000000000000000000000000000

The optical cable connecting new york and Stockholm started from & KKL in K month, and C-

1=./ )*+ service. At present, many telecom companies and mass industries around the world are also under construction.

C- 1=。 /) *+network. The figure shows the application scheme of C- 1=. / )*+.

Figure, C- 1=. /) *+Application Scheme

In the figure,) *+fiber ring is composed of bidirectional fiber ring; There can be many types of routers.

Different levels are connected to their respective C- subnets. In the figure, (&; , such as router &;

Use the router! Communication, access line rate is m & amp; , realize C- 1=. / )*+,in

) DG< & trunk line and) DG.

Support (signal), set by) *+network management system, this branch is similar to NDG network.

The permanent virtual circuit (shown by dotted line in the figure) set in is fixedly connected to the router &;

Use the router! amongst

Development trend of photoelectric technology

l(& amp; The structure is simpler

At present, in -O technology, the frame structure is more complicated. ) *+There are big ones in the frame structure.

For C- network, section overhead and channel overhead are redundant.

In the future) *+frame structure will be simplified. Even if it is finally independent) *+layer may also

Disappear, but its basic functions will still be integrated into the P*G layer.

l(! Functional enhancement

-O) When the network link bandwidth is tight, the delay of short packets after long packets changes.

The transition will be large, and the large delay variation makes it more difficult for -O) to support delay-sensitive response.

Use. Maybe the next step -O) will adopt new technologies, such as "9672Q )*+ format.

To solve these problems. In addition, the conventional method for transmitting C-structure signals in) *+is

C-R-R+* IJR) *+, because) *+The original branch interface is M &;; Or M#, a

C package needs to be divided into multiple m & amp; (or M#) link, that is, multiple links need to be established at the same time.

Road, which will increase the complexity of configuration, in multiple M & amp; It is difficult to balance the load, which is also unfavorable.

Ensure that multiple m & amp; Have the same transmission delay. So it needs to be added) *+equipment.

Support SJ cascade function, and use multiple SJ cascades to carry a single link. for

In order to transmit C signal more effectively, it is also an increase to add Ethernet interface in) *+equipment.

Powerful development trend.

L () products have higher performance.

With the continuous expansion of the Internet, the routing table on the Internet is also expanding. Despite being adopted

Figure-

Table items, but there are still hundreds of thousands of lines. At the same time, the current U:78 routing is adopted.

This architecture cannot support the performance requirements of future networks. If the interface speed is used

If the capacity of the router itself is exceeded, the router will not have all the original bandwidth.

Effectively convert into available bandwidth. Routers need a switching speed of D:78 to be economical.

Effectively expand to higher interface speeds. At the same time, the future network also needs high performance.

High-density and scalable D:78 switching router.

L( # program is getting closer to the edge.

As the core network is replaced by the optical network based on P*G, the core network will

-OP technology is widely used, and -O) technology will be more used in access networks and metropolitan area networks.

Apply. The reason is that the access rate is low and it is not economical to adopt -OP technology.

While technologies with lower signal rates can be used for smaller packet switching.

And distribution to meet the requirements of users.

Verb (abbreviation of verb) conclusion

In order to meet the business requirements of the rapidly growing data communication network, especially C48. /4.8.

Seek and solve the following network congestion, delay and quality of service problems, C48. /4.8.

The backbone network needs to be redesigned to be high-speed, scalable and safe to adapt to various industries.

Characteristics of service. With the continuous progress of gigabit and terabit router technology, G-I)

With the continuous development of C- business, -O) is used more and more.

W continued on page $ "x

Figure, online library system subscription class WO/ >. /X state diagram

So far, we have completed the dynamic construction of online book sales system based on EGI.

In the model, the established views can not only help designers to consider the interaction order of system components.

Visualization of the examination process can also help designers to design the system intuitively.

Interactive interface of components.

#, concluding remarks

Object-oriented system analysis and design (OO)N* is an object-oriented method.

And provides engineering blueprint for the realization of the system. Due to the object-oriented technology

OON encapsulation and inheritance enable the system to be established by OON R * method.

Reusable, easy to maintain and extensible, it has been vigorously promoted by the industry.

Rush On the other hand, EGI focuses on many advances in object-oriented software development and design in recent years.

Experience and innovative ideas, which not only support object-oriented analysis and design, but also support

The whole process from requirements analysis and design to software development has become oriented.

Standard modeling tools for object analysis and design. When discussing object-oriented and EGI

On this basis, this paper constructs an object-oriented online book sales system by using EGI.

Model development, modeling based on EGI provides the soul for the whole system development process.

Vivid, consistent and readable expression ensures the correctness of system analysis. Pass simultaneously

The static and dynamic modeling mechanism of EGI is expounded from many angles of system analysis.

Static structure and dynamic behavior of book sales system. Through this practical modeling

Cheng, we have established a deep understanding of object-oriented analysis and design.

Knowledge.