9.8 UML class diagrams PDF

Title 9.8 UML class diagrams
Course Intermediate Programming Methodologies in C++
Institution De Anza College
Pages 2
File Size 93.8 KB
File Type PDF
Total Downloads 42
Total Views 154

Summary

The Universal Modeling Language (UML) is a software design language that uses various types of diagrams to visualize program structure and behavior. Static components of software, such as variables and functions used in the application, are visualized using a structural diagram. A behavioral diagram...


Description

9.8 UML 9.8 UML UML class diagrams

The Universal Modeling Language UML is a language for software design that uses different types of diagrams to visualize the structure and behavior of programs. A structural diagram visualizes static elements of software, such as the variables and functions used in the program. A behavioral diagram visualizes dynamic behavior of software, such as the flow of an algorithm. A UML class diagram is a structural diagram that can be used to visually model the classes of a computer program, including member variables and functions.

Description:  One box exists for each class. The class name is centered at the top.  Class members are listed in the box below. Member variables have a name followed by a colon and the type.  Each member function's name and return type is listed similarly.  Private and public access is noted to the left of each member. A minus (-) indicates private and a plus (+) indicates public. QUESTIONS Refer to the diagram above

1 The Square class' size member is _____. private 2 The computeArea() function takes a double as a parameter. False. The "double" after the colon indicates the function's return type, not a parameter type. 3 Both the Circle and Square class have a member variable named center. True. Both classes have the center member, of type Point. 4 A UML class diagram is a behavioral diagram. False. 5 A UML class diagram describes everything that is needed to implement a class. False. The class diagram does not specify how functions are implemented, or even what the intended functionality for a class is.

UML for Inheritance UML uses an arrow with a solid line and an unfilled arrow head to indicate that one class inherits from another. The arrow points toward the parent class. UML uses italics to denote abstract classes. In particular, UML uses italics for the abstract class' name, and for each pure virtual function in the class. As a reminder, a parent class does not have to be abstract. Also, any class with one or more pure virtual functions is abstract....


Similar Free PDFs