tailieunhanh - Lecture Software construction - Lecture 5: Class diagrams
This chapter presents the following content: Examples of class diagrams; navigation, visibility, named associations, and multiplicity in UML; interfaces and implementation, in UML. In this chapter students will be able to: Students will have a strong conceptual foundation for their future uses of the OO features of Java, students will be able to interpret a class diagram, students will be competent at the basic OO design patterns. | Software Construction Lecture 5 Class Diagrams 1 Agenda 2 Topics: Examples of class diagrams Navigation, visibility, named associations, and multiplicity in UML Interfaces and implementation, in UML If you actually want to learn this material Find your own examples of class diagrams on the web. Try to interpret them. Look for patterns. Talk about it within your study group. Learning Objectives 3 Students will have a strong conceptual foundation for their future uses of the OO features of Java Interfaces Students will be able to interpret a class diagram Worked examples in this lecture Students will be competent at the basic OO design patterns Implementing interfaces, composing classes, extending classes Example of Inheritance 4 Source: Too much detail? 5 Source: Simplify! (with a little more notation) 6 Multiplicity: There is exactly one teacher per course, as indicated by the | Software Construction Lecture 5 Class Diagrams 1 Agenda 2 Topics: Examples of class diagrams Navigation, visibility, named associations, and multiplicity in UML Interfaces and implementation, in UML If you actually want to learn this material Find your own examples of class diagrams on the web. Try to interpret them. Look for patterns. Talk about it within your study group. Learning Objectives 3 Students will have a strong conceptual foundation for their future uses of the OO features of Java Interfaces Students will be able to interpret a class diagram Worked examples in this lecture Students will be competent at the basic OO design patterns Implementing interfaces, composing classes, extending classes Example of Inheritance 4 Source: Too much detail? 5 Source: Simplify! (with a little more notation) 6 Multiplicity: There is exactly one teacher per course, as indicated by the 1. A lecturer can teach any number of courses, as indicated by 0*. We can also write 1* in a UML diagram. The arrowheads indicate that the taughtBy association is navigable in both directions, telling us that Course has an instance variable teacher, of type Lecturer, and Lecturer has the instance variable Vector course. Simplify even more, with defaults 7 Associations have default multiplicity 1 Association endpoints have a default name. Course has an instance variable myLecturer of type Lecturer Lecturer has an instance variable myCourse of type Vector Getters, setters may be implied. Unimportant members might not be shown. Defaults may be well-defined by an organisation’s stylesheet, or (more commonly) by their UML-drawing software package. See . : “Properties of Attributes in UML Diagrams” for VS 2013. One-way Navigation 8 These courses have a Vector of their Lecturers and Students. (They might have a List;
đang nạp các trang xem trước