This article is based on the Together ControlCenter6.0 Introductory Practice Tutorial (Li Ying) combined with the company's version Together, to achieve the Togethercontrolcenter example project in the Airline 6.0 Introductory practice tutorial. I have only completed the modeling of the project, as for the writing of functions, debugging, and automatic generation of documentation, are not implemented in this article.
I. Engineering structure
Airline engineering modeling is completed as shown below:
Description
1. The left side is the menu area. The two-level project in the tree menu includes all the content in the airline project, including the role (Actor), Object (objects), use cases, and activities. The last three items metamodels, patterns, primitivetypes are generated by the system, and we don't need to move.
2. Upper right part of the editing area. This project consists of a PACKAGE--AIRLINEPD, a use case--makereservation, a activity--request reservation. The airline project is expanded in the tree menu on the right, including AIRLINEPD, makereservation, Request reservation, and clearly shows what the project contains.
3. The lower right section is the attribute area. It displays the attributes of the selected element for us to modify.
4. Double-click AIRLINEPD to enter the edit area named AIRLINEPD, as follows:
5. Double-click Makereservation to enter the edit area named Makereservation, as follows:
6. Double-click Request Reservation to enter the edit area called Request Reservation, as follows:
Let's take a look at how these things come from here.
Second, step
1. New Project
A. Create a new folder in your computer named airline. Open together, select Open location for airline folder;
B.together Open, see Welcome interface;
C. In the upper left-hand corner of the System menu, choose File-New project, select "UML 2.0 Project" and click "Next";
D. Fill in the project name airline, click "Done" and a blank edit area named airline appears.
Note Three points:
i) the location where the project is saved defaults to using the default location, which is the directory we selected when we opened together. Since we have specified the directory, there is no need to modify it;
II) It is recommended to set up a corresponding folder for each project, otherwise there will be multiple projects in the same project directory confusion.
III) do not create a new project with a project already open because the new project will be added to the open project by default.
At this point, an empty project named airline is established. Now let's start adding content to airline: A PACKAGE--AIRLINEPD, a use case--makereservation, a activity--request reservation.
2. New Package and add classes (Class)
Description: The purpose of this diagram is to show the data relationships in the project. The package can be understood as this project. Class is the class involved in the project. In many projects, the class corresponds to the corresponding table (*.TBL) in the database.
A. In the edit area named airline, right-click and select New->package. A package named Package1 appears in the form of an icon;
B. Modify the package name to AIRLINEPD: Click on the name on the icon to modify it, or you can select the icon to modify its Name property in the property bar on the bottom right;
At this point, the package named AIRLINEPD has been added to completion. Next we add a class named Flight for AIRLINEPD.
C. Double-click the AIRLINEPD icon to enter a blank editing area named AIRLINEPD;
D. Right-click in the blank edit area and select New->class. A class named Class1 appeared;
E. Modify the name of the Class1 flight, can be directly modified, or modify its Name property;
At this point, the class named flight is added to the AIRLINEPD. All week, a class will contain variables and methods, so let's add them to class.
F. Select flight, right-click, select New->attribute, a property named Attribute1 (which can be understood as the variable name) appears in the flight;
G. The name of the modified Attribute1 is date and the data type is date;
H. Select Flight, right-click, select New->operation, a property named Operation1 (which can be understood as the method name) appears in the flight;
I. Modify the name of the Operation1 (name) to Makereservation, the return type is Boolean, add 2 parameters (Parameters): String type name and type int tkind;
At this point, we've done the work of adding variables and methods to class. Other classes can be added in the same way, which is not mentioned here. The following lines are used to represent the relationship between a class and a class.
Note: Complex modifications, such as steps g and I, should be modified in the property bar.
J. The narrow strip between the menu bar and the editing area of the Wired tool. You can use the name of the arrow to determine its purpose.
Note: Arrows with a diamond are obtained by association changing its association type property.
3. Create a new use case diagram (Diagram) and add a role (Actor), object, use case
Description: This diagram represents the interaction between roles, activities, and the project (System). That shows what users will be using the system in the future. What the user needs to do with the system. What content the system needs to carry.
A. Go back to the editing area named airline. Right-click and select New Diagram->use case. Get use case Diagram1;
B. Modify the use case Diagram1 name makereservation: Click on the name on the icon to modify it, or you can select the icon to modify its Name property in the property bar on the bottom right;
At this point, the use case diagram named Makereservation is added to completion. Next we add roles (actors), objects (object), and use cases for makereservation.
C. Double-click the Makereservation icon to enter a blank editing area named Makereservation;
D. Right click, select New->actor, get Actor1;
E. Modify the name of the Actor1 is passenger, you can modify it directly, or you can modify its Name property in the property bar;
At this point, add the role complete. The project airline contains 3 characters, the remaining two are added as above. Add an object below.
F. In the blank area right-click, select New->object, get Object1;
G. The name of the modified Object1 is airline reservation System;
At this point, an object named airline reservation system is added to the makereservation. Below to add the use case.
H. Select Airline Reservation System, right click, select New->use case, get UseCase1;
I. The name of the modified UseCase1 is check availability;
J. Connect roles and use cases.
At this point, the use case named Check availability is added to the airline reservation system. The remaining three use case can be done in the same way.
Note: Use cases are created inside objects (object) to display their attribution relationships. The role (actor) is outside the object.
4. Create a new Activity Diagram (activity) and add activities and actions (action)
Description: I believe that people who have used Visio will know that it is a flowchart.
A. Go back to the editing area named airline. Right-click and select New Diagram->activity. Get activity Diagram1;
B. Modify the activity Diagram1 name to request reservation: Click on the name on the icon to modify it, or you can select the icon to modify its Name property in the property bar on the bottom right;
At this point, the activity diagram named Request reservation is added to completion. Next we add activity to request reservation.
C. Double-click the Request reservation icon to enter the blank edit area called request reservation; d. Right click, select New->activity, get Activity1;
E. Modify the name of Activity1 as request reservation, you can modify it directly, or you can modify its Name property in the property bar;
At this point, the add activity is complete. Add a swimlane below (Activity Partition).
F. Select Request Reservation, right click, select New->activity Partition, get Activity Partition1;
G. Change the name of activity Partition1 to Plane/flight Description;
H. Increase the lanes named flight reservations and Reservation/ticket services in the same way;
Attention:
i) lane in the book name is Swimlane, but in this software did not find this thing, is now called Activity Partition;
II) to add a swimlane within the request reservation because they have affiliation.
At this point, the three lanes in the Request reservation have been added. Below to add an action.
I. Select Plane/flight Description, right click, select New->action, get Action1;
J. Modify the name of the Action1 to get Capacity (CAP);
K. Add the corresponding action in the other lanes in the same way;
L. Finally, use control flow to connect the actions, and if the control flow has descriptive text, modify its Label property.
Note: Be sure to determine the swimlane to which you want to add the action. The flowchart icon can be selected in new by right-clicking, or directly in the tool bar. The process start symbol is called initial, the end symbol is called activity Final, parallel call fork, judge called decision.
Iii. Summary of Experiences
A. After adding the above content, go back to airline's edit area and you can see that together has generated the newly added content into the view. As long as the content is added correctly, you can get a neat view;
B. The names need to be separated, use underscores as much as possible. Points, colons, connecting lines, etc. are often not accepted;
C. Pay attention to the relationship between layers and levels. As long as the relationship is right, the view is correct and orderly.