Please enable JavaScript.
Coggle requires JavaScript to display documents.
COMP303 Software Design - Coggle Diagram
COMP303 Software Design
- UML(Unified Modeling Language)
-
State Diagram
(no credit, no selection) ; (no credit, selection); (credit, selection)
Class Diagram
<<interface>>, class, attributes, implements, extends, dependency, aggregation
-
-
-
Idea: To further support code reuse, and thus avoiding DUPLICATE CODE
-
-
-
-
-
Immutability (no setters, no way to change internal states)
-
-
-
-
-
-
Branch Coverage : if / else, true/false in each if
-
Test methods
-
White-box (structural): use metaprogramming to see if the internal attributes store the right values
assertEquals( expected, actual) ; assertThrows(exception, new executable(){ public void execute() throws Throwable{} }
:red_flag: PROTOTYPE
set prototype, and clone that prototype to create objects under a particular interface
:red_flag: COMMAND
Allow you to undo a method, or execute commands in a batch
:red_flag: DECORATOR
Aggregates only one object, provide it with new services
-
-
Def: Composition means one object holds a reference to another object and delegates some functionality to it.
Object Identity, Equality and Uniqueness
:red_flag: FLYWEIGHT
private Constructor, public static get(...)
-
:red_flag: SINGLETON
private Constructor, global variable, get(...)
-
:red_flag: NULL OBJECT
design a "null class" under an interface, replace java null with an object of this "null class"
-