Access Modifiers
4: public, default, protected, private
public
can be modified by all (class, package, subclass, and world).
default
can be modified within the same class or package only.
protected
can be modified within the same class, package, or subclass.
private
can only be modified within class.
Dependency
objects which class relies on in some way
Simple dependency
“uses a” relationship: object of another class used as argument/return type of method
Association
“has a” relationship: one class has object of another class as attribute
Aggregation
“has many” relationship: one class has many instances of another class
Composition
“needs a/needs many” relationship: one class has nested class. cannot make instances of nested class without making instance of outer.