Index
Steps
Concept Sketch
Object Diagram
Simplified Object Diagram 💡
Even Simpler
Blueprint
A great place to start when coding objects is with a simple
object diagram
.
It does two things:
Gets us familiar with what our model
Gives us a blueprint to beging coding (the object diagram)
Steps
Concept Sketch
We are coding a statistics calculator.
In this case we have input of some
numbers
and the calculator will generate some output.
Object Diagram
A quick object diagram tells us about the main object and its components (
ivars
).
We'll call our object type (class) "Stats" and it has one component "nums".
Where Stats abbreviates StatisticalCalculator and "nums" abbreviates "numbers".
Simplified Object Diagram 💡
We simplify the diagram here to a simple textual diagram.
\-- Stats | |---- nums
ivar
Even Simpler
Simple is good. Your choice.
Stats nums
ivar
Blueprint
Our object diagram (whichever we choose) is our "blueprint" as we begin coding.
We should keep it handy to reference.
Stats nums
JavaScript Guide (Chapter 404 - Array)
Chapter 404 - Array
Stats Object Diagram
Challenge
Search Site
Home
Back To Top