Lecture 5 Flashcards
What are the two main components of a Class Diagram?
Class Attributes at the top, Class Functions at the bottom.
What does Inheritance represent in a Class Diagram?
It shows the relationship where one class inherits properties and methods from another class.
What does Composition represent in a Class Diagram?
It represents a whole-part relationship where the part cannot exist independently of the whole.
What does Aggregation represent in a Class Diagram?
It represents a whole-part relationship where the part can exist independently of the whole.
What does Multiplicity indicate in a Class Diagram?
It indicates how many instances of one class can be associated with one instance of another class.
What are the main objects in a Dynamic Model of a Sequence Diagram?
Objects, Functions, returned variables
What is the method used in a Dynamic Model of a Sequence Diagram?
find(description), (foundMatch(description), fetch(description), clone(item).
What does an IF / ELSE statement represent in a sequence diagram?
It shows conditional logic where actions are taken based on the state.
What does the IF condition ‘if balance >= amount’ represent in a sequence diagram?
If balance is greater than or equal to the amount, addDebitTransaction() and storePhotoOfCheck(theCheck).
What actions are taken if the IF condition ‘balance >= amount’ is not met?
addInsufficientFundFee(), noteReturnedCheck(theCheck), returnCheck(theCheck).
What does ‘getAmount()’ represent in a class diagram?
It is a method in the Check class.
What does a solid line in a sequence diagram represent?
A solid line represents a request sent from one object to another.
What does a dotted line in a sequence diagram represent?
A dotted line represents the return of a value or variable from a function.
What do the boxes in a sequence diagram represent?
They mean the objects are active/running.
What do the dashed lines in a sequence diagram represent?
They mean the objects are waiting.
What is a Practice Question for sequence diagrams?
Draw a sequence diagram documenting the interaction where a Game class sends a roll() message to a Dice class, which sends a nextInt(6) message to a Random class, increments the result by one, and returns it to the Game object.
What does a black dot represent in a Dynamic State Diagram?
Initial State.