1. DEFINE
    1. Top-Down Design- a design where we treat each design step in the same way as we treated the original problem for as long as possible.
    2. Abstract Step- a design step that can be further defined
    3. Concrete Step- a design step that cannot be further defined
    4. Scope- the area in a program where an identifier can be accessed
  2. SHORT ANSWER
    1. When do we make a design step into a module.
      1. When it is a level 1 design step
      2. When it is an abstract step
      3. When it is a design step that is called multiple times
    2. When can we write a function so that it can be called as an expression rather than as a statement?
    3. When the function returns a single value (that is for now, we will see an exception to this rule in section 3 of the course).

  3. PROGRAMMING AND PROBLEMS
    1. Be prepared to translate an analysis and top-down design into code by writing function calls, declaring the parameters, writing function prototypes, and writing function definitions. The analysis and top-down design will be supplied. It will be based on one of the problems from the past worksheet.
    2. PROBLEM:

      Find and print the unit price of a round pizza using the area as the total number of units.

      ANALYSIS

      Input- Diameter, Price

      Output- Unit Price

      Extra Variables

      Formulas-

      DESIGN

      1. Translate the Solution into code
        1. Using the solution above, write the function calls and declare the parameters that will exist in int main().
        2. int Diameter

          float Price, Unit_Price;

          get_pizza_info(Diameter, Price);

          calc_unit_price(Diameter, Price, Unit_Price);

          print_unit_price(Unit_Price);

        3. Write the function prototypes for the function calls in #1.
        4. void get_pizza_info(int &, float &);

          void calc_unit_price(int, float, float &);

          void print_unit_price(float);

        5. Write the function definition for the function call that performs the calculation.
        6. void calc_unit_price(int cup_Diameter, float cup_Price, float &cup_Unit_Price)

          {

          float Radius, Area;

          Radius = cup_Diameter/2.0; // if Diameter is an int, you // must have 2.0 here.

          Area = 3.14 * pow(Radius,2);

          cup_Unit_Price = cup_Price/Area;

          }

        7. If you wrote the function for calculating so that it was called as a statement, rewrite the function definition so that it could be called as an expression. If you wrote the function for calculating so that it was called as an expression, change the definition so that it could be called as a statement.
        8. 	float calc_unit_price(int cup_Diameter, float cup_Price)
          
          
          	{
          		float Radius, Area;

          Radius = cup/Diameter/2.0; Area = 3.14 * pow(Radius,2); return (Price/Area); }
      2. Be able to rewrite function definition of a function that is called as a statement into a function that can be called as an expression. Use the function below.
      3. 		void calc_average(int T1, int T2, int T3, float &Ave)
        		{
        			float Sum;
        
        			Sum = T1 + T2 + T3;
        			Ave = Sum/3;
        		}
        
        		float calc_average(int T1, int T2, int T3)
        		{
        			float Sum;
        
        			Sum = T1 + T2 + T3;
        			return (Sum/3);
        		}