I have a superclass that handles car decal information. I have a subclass that handles specific decal information for a transaction. I have a special override in the transaction decal that is used to check for certain things before a decal # can be set. The problem I'm having is that sometimes I need to grab information about a generic decal object and set it to my transaction decal. For instance:
TransactionDecal myTransactionDecal = new TransactionDecal();
Decal myGenericDecal = new Decal();
myTransactionDecal = (TransactionDecal) myGenericDecal.getGenericDecal();
But I get a runtime error telling me I can't cast between the types. What exactly am I doing wrong, and is this the correct way to go about it? Thanks!