College material from Object-Oriented Progamming II class.