tailieunhanh - Mastering UML with Rational Rose 2002 phần 4

Phần trên cùng của lớp giữ tên lớp và tùy chọn, khuôn mẫu của nó. Phần ở giữa chứa các thuộc tính, hoặc các thông tin mà một lớp học tổ chức. Phần dưới tổ chức các hoạt động, hoặc hành vi của một lớp. Nếu bạn muốn, bạn có thể ẩn các thuộc tính và / hoặc các hoạt động của lớp để làm cho sơ đồ của bạn dễ dàng hơn để đọc. | Chapter 6 Classes and Packages In UML a class is shown using the following notation Class - Attribute OperationQ The top section of the class holds the class name and optionally its stereotype. The middle section holds the attributes or the information that a class holds. The lower section holds the operations or the behavior of a class. If you would like you can hide the attributes and or the operations of the class in order to make your diagrams easier to read. You can also show the visibility of each attribute and operation the data type of each attribute and the signature of each operation on these diagrams. We will discuss these options in the next chapter. This Employee class will become a template for employee objects. An object is an instance of a class. For example objects of the Employee class might be John Doe Fred Smith and the other employees of the company. The Employee class dictates what information and behavior the employee objects will have. Continuing the above example a John Doe object can hold the following information John Doe s name his address his phone number and his salary. The John Doe object will also know how to hire John Doe fire John Doe and give John Doe a raise. The object has the information and the behavior specified in its class. Finding Classes A good place to start when finding classes is the flow of events for your use cases. Looking at the nouns in the flow of events will let you know what some of the classes are. When looking at the nouns they will be one of four things An actor A class An attribute of a class An expression that is not an actor a class or an attribute By filtering out all of the nouns except for the classes you will have many of the classes identified for your system. Alternatively you can examine the objects in your Sequence and Collaboration diagrams. Look for commonality between the objects to find classes. For example you may have created a Sequence diagram that shows the payroll process. In this diagram

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.