-- replace "undefined" by your definition

area r = undefined 

average x y = undefined

averageArea r1 r2 = undefined


-- the following tests can be used by you, once you have implemented your functions,
-- for testing, just invoke test1, test2, test5 in ghci

test1 = "test1: expected ~ 38.48451, computed: " ++ show (area 3.5 :: Double)
test2 = "test2: expected ~ 2.070796, computed: " ++ show (average pi 1 :: Double)
test5 = "test5: expected ~ 31.41593, computed: " ++ show (averageArea 2 4 :: Double)