Code for Lab 4 (ELEC 3050)