Midterm Study - UML Class Flashcards
How do you find system requirements needed for “things”?
WHAT THINGS DOES THE SYSTEM NEED TO KNOW ABOUT AND STORE INFORMATION ABOUT?
What are some different types of things?
What is the procedure for developing an initial list of things?
Step1: Using the event table and information about each event, identify all nouns in the system.
Step2: Using other information from existing systems, current procedures, and current reports or forms, add items or categories of information needed.
Step3: Refine list and record assumptions or issues to explore.
What is an object?
An object is an entity(thing) that has a well-defined role in the application domain, and has a state, behaviour and identity.
Explain the parts in an object?
Class: Type of thing
Object: each specific thing
Methods: Behaviours of objects of the class
State: the values for the attributes (which can be set and changed by methods)
What are the 3 main parts to a class in a class diagram?
Class name at the top, List of attributes in the middle, and list of operations or methods on the bottom.
What is a class diagram?
The class diagram models classes of objects instead of data entities.
Include Generalization/Specialization & Aggregation
What is Generalization/Specialization Hierarchies?
General superclasses to specialized subclasses.
Inheritance allows subclasses to share characteristics of their superclasses.
What is aggregation (whole-part hierarchies)?
Aggregation relates objects and its parts, defines objects in terms of its parts.
Example: A Personal Computer is an object in itself, but is composed of a CPU, Monitor, Keyboard etc… It is made of of other objects that can exist on their own, therefore it represents aggregation
What is Composition (whole-part hierarchies)?
Similar to aggregation where the one object is made up of many objects except the objects belong to the whole object.
Example, the room is “part of” a building, but if the building is gone so is the room.
How do you represent a class that has a many-to-many relationship between two other classes?
With a dotted line.
What are the three types of operations in an object model? (class)
Query (getter): An operation that accesses the state of an object but does not alter the state.
Update (setter): An operation that alters the state of an object.
Constructor: An operation that creates a new instance of a class.
How do you represent associations?
Association
- A relationship between object classes
- Degree may be unary, binary, ternary or higher
- Depicted as a solid line between participating classes
Association Role
- The end of an association where it connects to a class
- Each role has multiplicity, which indicates how many objects participate in a given association relations
What does a Unary association relationship look like?
What does a binary association relationship look like?
What does a ternary association relationship look like?