input mouse clicks for the opposite corners of rectangle outputdraw the rectangle print the perimeter and area of the rectangle formulasarea (length)(widthperimeter (length width triangle information same as previous problembut with clicks for the vertices of triangle formulasforpperimetersee length from line problem area ( )( )( cwhere aband are the lengths of the sides and + + five-click house you are to write program that allows the user to draw simple house using five mouseclicks the first two clicks will be the opposite corners of the rectangular frame of the house the third click will indicate the center of the top edge of rectangular door the door should have total width that is of the width of the house frame the sides of the door should extend from the corners of the top down to the bottom of the frame the fourth click will indicate the center of square window the window is half as wide as the door the last click will indicate the peak of the roof the edges of the roof will extend from the point at the peak to the corners of the top edge of the house frame