Please enable JavaScript.
Coggle requires JavaScript to display documents.
Classes & Objects p.2 (objs are similar to arrays bc they both have…
Classes & Objects p.2
overloading
multiple constructors can have the same name with diff params - need diff params for compiler to not complain
-
-
patterns for objects
-
exs: keeping a total, count, add, etc
- values, 2. constructor, 3. meths
-
static vars and meths
do not need obj, these vars & meths are shared among all objs in the class
-
-
-
returning multiple vals
can you return an obj? Yes, but you have to be careful
-
-