Added code and plots for all four exercises