Look at your code, you create a number of shapes and add them to your list, but what type of shape are they, and what are their dimensions? And you never add t1, but you add c1 twice. And what is n1 supposed to be, what is Shape1? I suggest you go to
The Java™ Tutorials[
^] and start learning Java properly.