Write a C++ program which does the following (Below is an outline)

repeat
    Print Menu

        1) Compute area of a triangle
        2) Compute your clothing size
        3) Convert temperature from Fahrenheit to Celcius (nearest integers)
        4) Convert temperature from Fahrenheit to Celcius (exact values)
        5) Test a number for being prime
        6) Calculate a windchill factor according to the formula in Programming Project 14 (page 296-7) of the textbook (though I am not convinced that it is the best formula available).
        7) Quit

    Read Option

    Test Option

        If  1
            Ask the lengts of the sides of the triangle

If the lengths are acceptable, find and print the area of the triangle (according to the formula below)

        If  2
            Ask user's height,weight, and age
            Find and compute hat size,jacket size, waist according to formulas in Problem 9, page 244 of the textbook
        If 3
            Ask for the temperature in Fahrenheit, as an integer
            Compute the temperature in celcius to nearest integer and print it out
        If 4
            Ask for the temperature in Fahrenheit (exact value)
            Compute the temperature in celcius (exact value) and print it out

        If  5
            Ask for an integer and determine whether it is prime or not.

        If 6
            Quit the entire program

       Otherwise
            Print "Invalid option"

    End Test

Until user quits

Specifications


1. Use a switch statement to implement the menu
2. Use functions for all subtasks (including printing the menu) . Write comments (pre- and post conditions) for function declarations. Tell what each function is supposed to be doing. Separate declarations from definitions.
3. Use the following formula to find the area of the triangle with sides a,b and c.
    Area= sqrt(s*(s-a)*(s-b)*(s-c)) where s = (a+b+c)/2. So, first ask for the lengths of the sides from the user.
Not every 3 numbers can be sides of a triangle. They must satisfy the triangle inequality: The sum of any two sides must be greater than the third. You should check this condition and give an error message if it is not satisfied.
4. All decimal point number outputs must have 2 digits after the decimal point.
5. Overlad the temperature conversion function to implement options 3 and 4. One for option 3 takes an integer argument and return an integer (which is the closest integer temperature). The other one will compute exact values as doubles. So both input and output types will be doubles.
6. You should only accept positive inputs for option 5. Give an error message if the input is negative or 0. 1 is not prime by definition.
7. Make sure the restriction on the temperature is not violated. Use the "assert Macro to achieve this.

8.   There is no universially accepted formula for the windchill factor. You may compare your answers againts some web pages that do calculate that value but keep in mind that i) the units are different    ii) the formulas are probably different. Here are couple of sites that caculate windchill effect:

Windchill 1

Windchill 2

Windchill 3