I\'m writing code to create an object, clone the object, then compare the two.
The object in question, Octagon, is an extension of an object GeometricObject
Replace
Octagon copy = (Octagon)test.clone();
with
Octagon copy = (Octagon)((Octagon)test).clone();
so that the called clone method is the one of your class.