
META TOPICPARENT 
name="WebHome" 

 Sample output
Specifications 

< < 
 Use a switch statement to implement the menu for extra credit.
 Use functions for all subtasks (including printing the menu). Write comments and preand post conditions with function declarations. Tell what each function is supposed to be doing. Separate declarations from definitions. I suggest writing a void "User Interface" function for each menu selction, and then math oriented support functions that this calls.

> > 
 Use a switch statement to implement the menu.
 Use top down design for your system. Write functions for all subtasks (including printing the menu). For each user option (e.g. triangle size, hat size, temperature conversion) write a simple function that promopts the user for the required fields, then calls a computing function to get the result, then displays the results. For xample write a user interface function "void triangeUI()" to get the inputs, and display the results for the triangle. Then write another function "double triangle(double height, double width)" which is called by tranangleUI, that takes the values entered, does the computation, and then returns the results (in this case the area of the triangle). Write comments and preand post conditions with function declarations. Tell what each function is supposed to be doing. Separate declarations from definitions.


 Use the following formula to find the area of the triangle with sides a,b and c (project 13, Chp 5) Area= sqrt(s*(sa)*(sb)*(sc)) 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.
 All decimal point number outputs must have 2 digits after the decimal point.
 Overload the temperature conversion function to implement options 3 and 4. The function for option 3 takes an integer argument and returns an integer (which is the closest integer temperature). All computation is done with integers (no rounding needed). The other one will compute the exact value as a double. So both input and output types will be doubles. Thus you will need two celsius conversion functions, as seen below in the Overloaded Functions for Celsius section.
