title: Is there any better option to calculate area as per user selection?
body: <p>I am building an android program in java which contain 2 edit text boxes, 2 spinners.</p>
  <p>Edit Text Boxes Name - Width, Height</p>
  <p>Spinner Names - Input, Output</p>
  <p>In input spinner there are 4 options - 1.Inch 2.Feet 3.Centimeter 4.Millimeter</p>
  <p>In output spinner there are 3 options - 1.SqMtr   2.SQft   3.SqCm</p>
  <p>User can enter width, height and select input type and output type. If user select input type as feet and output type as sqft from spinner then the area calculation will be width x height = sqft. So, I have to make a function for every possible selection made by user and I can pass the width and height entered by user in required function and get the area.</p>
  <p>So I want to know if there is any better way to do the calculation so that my code look clean and I can also get the area as per user selection in input and output spinner.</p>
  <p>I am beginner in java so I don't know if there is any better way to do it.</p>
  <p>Any help will be very helpful for me.</p>