The source code of my homework! It contains task 7 and 8.