Lab 6
/2010_F18/wk6/lab6.cpp
The purpose of this lab is to take an older assignment and convert it with
the use of function definitions and function calls. You will take lab3's
menu based area calculator program, and convert each calculation expression
into a function call corresponding to the shape. For this lab, you will
declare, call, and define the following functions:
- calcSquareArea: this func will take in a single float argument as the
square's side length and return length2 as a float
- calcRectangleArea: this func will take two float arguments for the
rectangle's base and height, and return base x height as a float
- calcTriangleArea: this function will take two float arguments for the
triangle's base and height, and return 1/2 x base x height as a float
- calcCircleArea: this function will take one float argument as the circle's
radius, and return 3.1415 x radius2 as a float
- isPositive: this function will take one float argument and return
true if the passed value is positive, false otherwise
- displayMenu: this void function will print out the menu and return
- displayArea: this void function will accept a float argument. Display
the passed value up to two decimal places and return
Use lab6.cpp as a starting point.
Have your lab checked off or submit via directory.