▁of ▁the ▁global ▁class ▁diagram ▁of ▁the ▁system . ▁ ▁Some ▁design ▁principles ▁and ▁strateg ies ▁ ▁Dep endency ▁injection : ▁The ▁basic ▁idea ▁is ▁that ▁if ▁an ▁object ▁depends ▁upon ▁having ▁an ▁instance ▁of ▁some ▁other ▁object ▁then ▁the ▁needed ▁object ▁is ▁" inject ed " ▁into ▁the ▁dependent ▁object ; ▁for ▁example , ▁being ▁passed ▁a ▁database ▁connection ▁as ▁an ▁argument ▁to ▁the ▁constructor ▁instead ▁of ▁creating ▁one ▁internally . ▁ ▁A cyc lic ▁dependencies ▁principle : ▁ ▁The ▁dependency ▁graph ▁of ▁packages ▁or ▁components ▁( the ▁gran ular ity ▁depends ▁on ▁the ▁scope ▁of ▁work ▁for ▁one ▁developer ) ▁should ▁have ▁no ▁cycles . ▁This ▁is ▁also ▁referred ▁to ▁as ▁having ▁a ▁directed ▁a cyc lic ▁graph . ▁ ▁For ▁example , ▁package ▁C ▁depends ▁on ▁package ▁B , ▁which ▁depends ▁on ▁package ▁A . ▁If ▁package ▁A ▁also ▁dep ended ▁on ▁package ▁C , ▁then ▁you ▁would ▁have ▁a ▁cycle . ▁ ▁Compos ite ▁reuse ▁principle : ▁F avor ▁polym orph ic ▁composition ▁of ▁objects ▁over ▁inheritance . ▁ ▁See ▁also ▁ ▁Class - respons ibility - coll abor ation ▁card ▁ ▁GR AS P ▁( object - orient ed ▁design ) ▁ ▁S OL ID ▁ ▁IDE F 4 ▁ ▁Object - orient ed ▁analysis ▁ ▁Object - orient ed ▁programming ▁ ▁References ▁ ▁External ▁links ▁ ▁Object - Ori ented ▁Analysis ▁& ▁Design ▁- ▁over view ▁using ▁U ML ▁Lar man , ▁Craig . ▁App lying ▁U ML ▁and ▁Pattern s ▁- ▁Third ▁Edition ▁Object - Ori