code for CSSE375 code swap exercises