removed cout from area constructors and added error checking to main