Exercise number 6 in introduction to object oriented programming at UIS.