Fixed, according to lab requirements

added a main, fixed the classes, updated the javadoc.