Solutions to the programming exercises