I have been told that using instanceof like in the code below is bad practice as it becomes repetitive and makes extension hard. I\'m pretty new to Java though and don\'t se