3.Composing Objects
Invarient: multiple variable Potraying unique state of Object if anyone changes it violates Invatient state.
e.g increment a number i.e read-modify-write if performed by multithread not as atomic operation
then the Invarient may not hold. bcoz with some unlucky time simultaeous read may happen
TODO : locking examples – on differnt object results in unsaafe state ehere as on same object reslyurs in safe state.