finalized, written for intro java at stanford

one piece of the whole program