Current location - Recipe Complete Network - Complete cookbook of home-style dishes - Answers to After-class Questions of uml System Modeling Foundation (Tsinghua University Publishing House)
Answers to After-class Questions of uml System Modeling Foundation (Tsinghua University Publishing House)
UML exercise answer

The first chapter is object-oriented design and UML.

1.

(1) General Mechanism of UML Rules in Basic Building Blocks

(2) Name attribute operation

(3) Encapsulated inheritance polymorphism

(4) Inheritance

(5) XP development model of waterfall model and fountain model based on component.

2. Multiple choice problem

( 1)C

(2)A B C D

(3)A B C D

(4) BC

(5) Answer

3. Short answer questions

A (1) class is a collection of objects with the same or similar structure, operation and constraint rules, while an object is a concrete instance of a class, and each class is an abstraction of objects with some common characteristics. The relationship between classes and objects is just like the relationship between molds and castings. The result of instantiation of a class is an object, while the abstraction of a class is a class. A class describes a group of objects with the same characteristics and behaviors.

(2) 1.UML is a language. 2.UML is for modeling. 3.UML is a unified standard.

(3) Modeling can help us visualize the system according to the actual situation or the form we need; Provide methods to explain the system structure or behavior in detail; Give a template to guide the system construction; Record the decisions we make.

The following principles should be followed when modeling: the choice of what model to create has a far-reaching impact on how to solve problems and how to form solutions; Each model can be represented by different accuracy levels; The best model is connected with reality; A single model is not enough; It is best to use an almost independent model to deal with every important system.

(UML is closely related to object-oriented software development. It can be said that object-oriented software development promotes the emergence of UML. However, in the process of UML standardization, standards and specifications in the fields of business modeling, workflow modeling and database modeling have been absorbed, forming a highly adaptable standard.

(5) In the process of software design, use UML modeling to better understand the system being developed. Through UML modeling, the following purposes can be achieved: it is helpful to visualize the system according to the actual situation or the required style; Able to adjust the structure or behavior of the system; The template to guide the system construction is given. Record the decisions made.

The second chapter summarizes the general knowledge points of UML.

1.

Implementation of (1) dependency generalization association

(2) View the diagram model elements

(3) Implement view deployment view

(4) constructing a label value constraint

(5) General division of specification modification

2. Multiple choice problem

( 1)D

(2)C

(3) Answer

⑷A B

⑸D

3. Short answer questions

(1) In UML, four basic object-oriented things are defined, namely, structural things, behavioral things, grouping things and annotation things.

(2) Component types are: source code component, binary component and executable component.

(UML mainly includes static view, use case view, interaction view, implementation view, state machine view, activity view, deployment view and model management view.

(4) Views and graphics are the relationship between inclusion and inclusion. Each view contains one or more graphics.

(5)UML provides some common mechanisms. Using these common mechanisms, UML can add appropriate descriptive information to various diagrams, thus improving the semantic expression of UML. Usually, the basic functions of model elements can't perfectly express the actual information to be described, but these general mechanisms can effectively help to express and help us to carry out effective UML modeling. These universal mechanisms provided by UML run through all aspects of the whole modeling process. As we mentioned earlier, the general mechanism of UML includes specification, decoration and general division.

Chapter III Process of Rational Unity

1.

(1) Role Activity Product Workflow

(2) logical view, process view, physical view, development view and use case view

(3) Design and development verification

(4) Two dimensions

(5) Milestones in the periodic iterative process

2. Multiple choice problem

( 1)A B C D

(2) methyl propyl butyl

(3) methyl propyl butyl

(4) BC

(5)A B C D

3. Short answer questions

(1) Initial stage, detailed stage, construction stage and handover stage.

(2) Iterative software development, requirement management, component-based architecture application, visual software model establishment, software quality verification and software change control.

(3) In the development process of Rational unified process, it is expressed by four modeling elements: role, activity, product and workflow.

(4) For an architecture-centered development organization, it is necessary to pay attention to the purpose, expression and process of architecture.

(5)Rational unified process is a software product of Rational software development company, which is closely integrated with a series of software development tools developed by Rational software development company. Rational unified process has its own set of architecture, and this architecture exists in a form acceptable to most projects and development organizations. It provides a way to manage software development organizations, with its own goals and methods.

(6) Steps to realize the rational unification process: evaluate the current state, establish clear objectives, identify process risks, plan process realization, implement process realization and evaluate process realization.

(7)Rational unified process, as a software engineering process, provides development organizations with methods such as how to strictly allocate the tasks of software development and how to strictly divide the responsibilities of personnel involved in development. According to the pre-established plans, these plans include the project time plan and budget, and develop high-quality software products that can meet the requirements of end users. Rational unified process provides a predictable software development process, a system product to ensure the production of high-quality software, a set of flexible conversion and expansion process framework, and many software development best practices, all of which make Rational unified process have a far-reaching impact on the development of modern software engineering.

Chapter IV Installation and Operation of Rational Rose

1.

(1) Create and open the recently used model.

(2) Use Case View Logical View Component View Deployment View

(3) Editing area

(4) model content record

(5)mdl

2. Multiple choice problem

( 1)A B C D

(2) methyl propyl butyl

(3) BC

(4) methyl propyl butyl

⑸C

3. Short answer questions

(1)Rational Rose is a complete solution with the ability and flexibility to meet the requirements of all modeling environments, including Web development, database modeling and various development tools and languages. Rational Rose allows system developers, system managers and system analysts to establish visual models of system requirements and system architecture in each development cycle of software, and can convert these visual models of system requirements and system architecture into codes to help system development. Rational Rose modeling tool can provide good support for UML.

(2) omitted, refer to the second quarter.

(3) You can import models, packages or classes by selecting Import under the File menu bar. Available file types include. mdl,。 ptl,。 Sub or. Cats and so on. And then import the Model dialog box. By importing models, you can make use of existing models.

By selecting "Export Model ..." under the "File" menu bar, we can export the model. The exported file has a suffix. ptl。 For example, when selecting a specific class, we can choose Export User under the File menu bar to export it.

(4) 4) The main interface of Rational Rose 2003 is mainly composed of title bar, menu bar, toolbar, workspace and status bar. The default workspace consists of four parts, namely, the browser on the left, the document editing area and the graphic editing area on the right, and the following logging.

The fifth chapter uses Rose to design UML

1.

(1) Use Case View Logical View Component View Deployment View

(2) Inconsistency check and recheck function The recheck function reuses modeling elements and graphic functions.

(3) Component Diagram Package

(4) Deployment

(5) Information of other components when the model code base executes files.

2. Multiple choice problem

(1) A.D.

(2) methyl propyl butyl

(3) methyl propyl butyl

(4) BC

(5)A B C D

3. Short answer questions

(1) The Rose model established by Rational Rose includes use case view, logical view, component view and deployment view respectively. Use case view is a high-level abstraction of system functions. Logical view is how the system realizes the functions described in the use case. The deployment view shows the actual deployment of the system, which is an architectural view used in analysis and design to understand how the system is physically distributed on a set of processing nodes.

(2) Using Rational Rose to generate code includes the following four steps: selecting the target model to be converted, checking the grammatical errors of the language, setting the code generation attributes, and finally generating the code.

(3) In Rational Rose, static information about classes, class attributes, class operations, relationships between classes, packages and components can be collected, which can be transformed into corresponding models and displayed in corresponding diagrams.

(4) Use case view focuses on the high-level abstraction of system functions, which is suitable for analyzing and obtaining the requirements of the system, without paying attention to the specific implementation methods of the system. The logical view focuses on how the system realizes the functions described in the use case, and mainly supports the functional requirements of the system, that is, the functions that the system should provide when providing services to users.

Chapter VI Use Case Diagram

1.

(1) Use Case Diagram

(2) the system boundary association of participants (roles)

(3) Including extended generalization

(4) Use case granularity

(5) Components outside the system

2. Multiple choice problem

( 1)D

(2) methyl propyl butyl

(3)C

(4)C

⑸D

3. Short answer questions

(1) The best way to identify use cases is to start with analyzing system participants, and new participants will often be found in the process. After finding the participants, we can determine the use cases of the system according to the participants, mainly to see how the participants use the system and what services the system needs to provide. For this selected use case model, it should not only be easy to understand, but also be consistent for different stakeholders.

(2) We can abstract three relationships between use cases: inclusion, expansion and generalization. If multiple use cases use the same behavior, you can abstract this common behavior into a use case separately, and then let other use cases contain this use case. Extended relationships are usually used to handle exceptions or build flexible system frameworks. Using extension relation can reduce the complexity of the system, which is beneficial to the expansion of the system and improve the performance of the system. Extended relations can also be used to deal with problems that are difficult to describe in basic use cases, making the system clearer and easier to understand. When you find that two or more use cases in the system have commonalities in behavior, structure and purpose, you can use generalization relations. At this point, these common parts can be described by a new (usually abstract) use case, which is the parent use case.

(3) It depends on the complexity of the system. For a relatively simple system, you can use fewer use case diagrams, while for a more complex system, you must create more use case diagrams in order to clearly express the system functions. It is necessary to analyze the specific problems according to the specific situation of each system, and decide the size and number of use cases on the premise of ensuring that the whole use case model can be understood as much as possible.

(4) Use case diagram is the first step from software requirements analysis to final realization. It shows the users of the system the functions they want to provide, which is beneficial to the communication between users and software developers. With the help of use case diagrams, system users, system analysts, system designers and domain experts can discuss problems in a visual way, which reduces many communication obstacles and facilitates reaching a consensus on the problems.

(5) The steps of using Rose to create use case diagrams: determine the participants, create use cases, and finally create the relationship between use cases.

4. Computer problems

(1) The use case diagram is located in the CD-ROM student management system. mdl。 -& gt; User case view-> System administrator use case diagram

(2) The use case diagram is located in the CD of the student management system. MDL。 ->; User case view-> Teacher use case diagram

(3) The use case diagram is located in the CD of the student management system. mdl。 -& gt; User case view-> Student use case

Chapter VII Class Diagram and Object Diagram

1.

(1) object chain

(2) Dependent generalization and associative realization

(3) Class

(4) Class interface data type component

(5) Shared private protected type

2. Multiple choice problem

( 1)A B

(2)C

(3)D

⑷D

⑸C

3. Short answer questions

The components of (1) class include class name, class attributes, class operations, class responsibilities, class constraints and class comments.

(2) Object graph consists of objects and chains.

(3) In the object-oriented analysis method, the graphical representation of classes and objects is one of the key modeling techniques. They can effectively establish visual object models for business fields and software systems, and express the main concepts of object-oriented models with strong expressive ability. The class diagram and object diagram in UML show the static structure of the system, in which classes and objects are the basis of graphic elements.

(4) A class consists of three parts, namely, the class name, the nature of the class and the operation of the class. The name column of a class contains only the class name. The property bar of the class defines the characteristics of all properties. Action classes are listed in the class. Association connection is used in the operation class, and features such as name, role and constraint are used in the association. A class is an abstraction of a class, and there are no multiple classes.

An object contains two parts: the name of the object and the attributes of the object. The object name column contains "object name: class name". Object defines the current value of the property. The operation content is not included in the object graph, because the operations of objects belonging to the same class are the same. Objects are connected by chains, which contain names and roles. There can be multiple objects.

4. Computer problems

The (1) class diagram is located in the CD-ROM student management system. mdl。 -& gt; User case view-> Class diagram

(2) The object diagram is located in the CD of the student management system. mdl。 -& gt; Logical view->; Class diagram

(3) The object graph is located in the CD of the student management system. MDL。 ->; Logical view->; Class diagram

This kind of diagram is located in the CD of student management system. mdl。 -& gt; User case view-> Class diagram

Chapter VIII Sequence Diagram

1.

(1) sequence diagram

(2) the activities of the sender and the receiver

(3) activation

(4) Lifeline

(5) Underline the rectangular box.

2. Multiple choice problem

( 1)A B C D

(2) Answer

(3) communication

(4)B

(5) BC

3. Short answer questions

The purpose of (1) sequence diagram includes: confirming and enriching a logical expression using context. Refine the expression of use cases. Effectively describe how to assign responsibilities to each class and why each class has corresponding responsibilities.

(2) Determine the sequence object. Create an object. Create a lifeline. Create a message. Destroy objects.

(3) Sequence diagram shows how different business objects interact, which is very useful for communicating how the current business is going. In addition to recording the current events of the organization, the business-level sequence diagram can also be used as a requirement file to deliver the requirements of the future system. In the requirements phase of the project, analysts can take the use case to the next level by providing a more formal expression. In this case, use cases are often refined into one or more sequence diagrams. Organization technicians can also record how a future system should behave through sequence diagrams. In the design stage, architects and developers can use this diagram to mine the interaction between system objects, thus enriching the whole system design.

(4) Destroying an object indicates the end of the object lifeline, and an "X" is used for identification in the object lifeline. The steps to add the destruction mark to the object lifeline are as follows: Select the button in the graphic editing toolbar of the sequence diagram, and the cursor will become a "+"symbol. Click the lifeline of the object to be destroyed, and the marker is identified in the lifeline of the object. The lifeline of the object disappears from the part below the destruction mark.

4. Computer problems

(1) sequence diagram is located in the CD of student management system. MDL-->; Logical view->; Enter student information 1 (sequence diagram)

(2) The sequence diagram is located in the CD of the student management system. MDL-->; Logical view->; Enter student information (sequence diagram)

(3) The sequence diagram is located in the CD of the student management system. MDL-->; Logical view->; Modify student information (sequence diagram)

Chapter 9 Collaboration Diagram

1.

(1) object collaborative relationship chain

(2) Interaction between objects

(3) Independent contact and association

(4) Collaboration diagram

(5) News

2. Multiple choice problem

( 1)B

(2)A B D

(3)D

(4) BC

(5) Answer

3. Short answer questions

The function of (1) collaboration diagram: It reflects the logical expression of specific usage context by depicting the message transmission between objects. Display the spatial organization structure of objects and their interactions. Another function of the collaboration diagram is to show the implementation of a class operation.

(2) The objects, messages and chains that make up the collaboration graph. The role of an object represents the role that an object or a group of objects should play in the process of completing the goal. The dynamic behavior of the system is described by a series of messages. A chain is an independent connection and association instance between two or more objects.

(3) There are synchronous messages and asynchronous messages in the collaboration graph. Synchronous messages are used when multiple threads are used in the system. Asynchronous messages are used when there are parallel activities, such as message queues.

(4) Collaboration graph and sequence graph are both interactive graphs, which are both equivalent and different. The sequence diagram shows the sequence of time messages, but it does not show the static object relationship. Sequence diagram can effectively help us observe the sequential behavior of the system. Collaboration diagrams are used to represent the relationships and messages between objects in collaboration, and to describe the implementation of operations or classifiers. When modeling the behavior of the system, the usual practice is to use sequence diagram to model the control flow in time sequence, and use collaboration diagram to model the control flow by object organization.

4. Computer problems

(1) The collaboration diagram is located in the CD of the student management system. MDL-->; Logical view->; Enter student information 1 (collaboration diagram)

(2) The collaboration diagram is located in the CD-ROM of the student management system. MDL-->; Logical view->; Enter student information (collaboration chart)

(3) The collaboration diagram is located in the CD-ROM of the student management system. MDL-->; Logical view->; Modify student information (collaboration chart)

Chapter 10 Activity Diagram

1.

(1) activity diagram

(2) a target stream

(3) Action state

(4) Entry action and exit action

(5) Swimming lanes

2. Multiple choice problem

(1) A.D.

(2)A B D

(3)C

(4)B

(5) Answer

3. Short answer questions

(1) Activity diagram describes the work completed during the execution of an operation, which is particularly useful for describing use cases with activity diagram. It can model the workflow of use cases and show the paths within and between use cases. Activity diagrams can explain how instances of use cases perform actions and change the state of objects. It shows how to perform a set of related operations and how these operations affect the objects around them. Activity diagrams are very useful for understanding business processes.

(2) 2) The UML activity diagram contains graphic elements: action state, activity state, combination state, bifurcation and combination, branching and combination, swimming lane and object flow.

(3) Bifurcation is used to indicate that the control flow is divided into two or more branches running simultaneously. A fork has an input transition and two or more output transitions, each of which can be an independent control flow. Branching is a part of transformation, which divides the transformation path into multiple parts, and each part has separate monitoring conditions and different results. When the action flow encounters a branch, the direction of the action will be determined according to the true value (Boolean value) of the guardianship condition. The guardianship conditions of each path of the branch should be mutually exclusive, so as to ensure that only one path is triggered.

(4) The action state is the execution state of atomic actions or operations, and cannot be interrupted by the transformation of external events. The atomicity of the action state determines that the action state is either not executed or completely executed without interruption. The action state cannot have entry action and exit action, nor can it have internal transfer. Action state is a special active state. The active state can be understood as the active state of atoms.

The active state is non-atomic, which is used to represent the execution of pure calculation with substructure. An active state can be decomposed into other sub-active or action states, and can be interrupted externally by events transferred from this state. The active state can have internal conversion, entry action and exit action. At least one output in the active state completes the transition, which is triggered when the activity in the state completes.

4. Computer problems

(1) Activity diagram is located in the CD-ROM student management system. MDL-->; Logical view->; State/activity model->; Student login

(2) The activity chart is located in the CD of the student management system. MDL-->; User case view-> State/activity model->; Student login

(3) The activity chart is located in the CD of the student management system. MDL-->; Logical view->; State/activity model->; Delete student information

Chapter 1 1 Packaging Diagram

1.

(1) package subsystem dependencies

(2) Public, private and protected

(3) Model component diagram

(4) Packaging drawing

(5) model

2. Multiple choice problem

( 1)A

(2)A B

(3)B C D

(4)B C D

(5) BC

3. Short answer questions

The relationship between (1) packages can be summarized as dependency and generalization.

(2) The package diagram is an important modeling tool to maintain and describe the model of the overall structure of the system. By describing each package in the diagram and the relationship between packages, the dependency relationship between modules of the system is shown. The package diagram is composed of packages and the relationship between packages, and it is an important tool to maintain and control the overall structure of the system.

(3) The basic elements of a package graph are packages, subsystems and dependencies. A package is a universal namespace and can have any kind of model elements. In the system model, each graph must be owned by a unique package, and this package may also be contained by another package. Packages form the basis of configuration control, storage and access control. Several relatively independent subsystems form a large complex system, and the relationship between the system and subsystems is basically a combination relationship. Through the description of each package and the relationship between packages in the package diagram, the dependence between modules of the system is shown.

(4) Packaging is the most important concept and component in the packaging drawing. A package graph consists of packages and relationships between packages. Without a package, there is no package map.

4. Computer problems

(1) The package map is located in the CD-ROM student management system. MDL-->; Logical view->; Baotushan

Chapter 12 Component Diagram and Deployment Diagram

1.

(1) code characteristics identity characteristics

(2) Component drawing

(3) Component classes and interfaces

(4) Virtual package

(5) Deployment diagram

2. Multiple choice problem

(1) A.D.

(2)B

(3)A B D

(4) Answer

⑸B

3. Short answer questions

(1) component diagram is suitable for the following modeling requirements: system source code, system release version, physical database, adaptive system, business model construction and system development management.

(2) Both have names, which can realize a set of interfaces, participate in dependencies, nest, have instances and participate in interactions. Classes describe the logical organization and intention of software design, while components describe the physical realization of software design. Classes can have properties and operations, while components only have operations. Only through components can interfaces be used.

(3) In the basic component diagram, the most common relationship between components is dependency and implementation.

(4) In UML, components mainly include configuration components, work product components and executable components.

4. Computer problems

(1) component diagram is located in the CD-ROM student management system. MDL-->; Component view->; Component diagram

(2) The deployment map is located in the CD of the student management system. MDL-->; Deployment view

Chapter 13 State Diagram

1.

(1) object

(2) State diagram

(3) Simple state and compound state

(4) Historical position

(5) Events

2. Multiple choice problem

( 1)A B C D

(2)A B

(3) Answer

(4) methyl propyl butyl

(5) BC

3. Short answer questions

(1) The state diagram consists of state, initial state, termination state, transition and judgment.

(2) A state machine is a device that records the state at a given moment. It can change its state according to various inputs or trigger an action for each given change. State diagram is essentially a state machine, or a special case of state machine. It is basically the projection of the elements in the state machine, which means that the state diagram contains all the characteristics of the state machine. The state diagram describes the dynamic behavior of an entity based on event response, and shows how the entity responds to different times according to its current state.

(3) The role of using state diagram modeling in software development: the state diagram clearly describes the transition order between states, and the execution order of events can be clearly seen through the transition order of states; A clear sequence of events helps programmers avoid the disorder of events when developing programs; The state diagram clearly describes the factors that affect the state transition, such as trigger events, monitoring conditions and actions, which helps programmers avoid illegal events in the program. Through judgment, the state diagram can better describe the branches of workflow caused by different conditions.

(4) Multiple sub-states that make up a state in sequence are mutually exclusive and cannot exist at the same time. The sequential synthesis state can have at most one initial state and one final state. A concurrent composition state can have two or more concurrent substates, and each concurrent substate can be further decomposed into continuous composition states. The concurrent composition state can have no initial state or final state.

4. Computer problems

(1) state diagram is located in the CD of student management system. MDL-->; Logical view->; State/activity model->; Student information

(2) The state diagram is located in the CD of the student management system. MDL-->; Logical view->; State/activity model->; system administrator