So cardArray is an object. I get each elements of this objects through getRank, getSuit methods in Card object. There is no setSuit and setRank. When I merge, as far as I know, I need to override values and swap them therefore I need setSuit and setRank methods. Below code fails with the error at the bottom and I am thinking because I am not able to use setSuit, setRank methods. Any ideas?
Deck
Card
TestDrive
Error