RM interview question

Design patterns in java