Pages

Monday, April 25, 2011

Session Outline: Monday, April 25, 5:10 PM to 6:00 PM SURGE 113

Wednesday's Session

Glad to see a good turnout last Wednesday. I'll keep the lab format like that from now on since it seemed to facilitate everyone who wanted help.

Brief

The goal of this lesson is to review everything that students should know up to this point and get everyone ready for the practice midterm on Wednesday.

Key Terms

No new key terms this week, except for the For loop and the While loop which doesn't

Outline

  1. [0-10 min] Q & A 
  2. [5 min] Go Over Today's Quiz 
  3. [5-10 min] Mini-Quiz 
    1. #include <iostream>
      #include <iomanip>


      using namespace std;


      int main()

      {

          // Prompt the user for a number

          double n;

          cout << "Enter a number: ";

          cin >> n;


          // Give a blank line between the input and the output

          cout << endl;


          while (n > 0)

          {

              n /= 2;

              cout << n << endl;

          }


          cout << "All Done!";

      }
       
  4. [0-10 min] Formatting Output Review 
    1. setprecision, fixed, setw, left, right, setfill 
  5. [0-10 min] If Statements 
    1. Blocks 
    2. Comparison Operators 
    3. Boolean Logic Operators 
  6. [5-15 min] For and While Loops 
    1. Output a countdown from a given n 
    2. The do ... while loop 
    3. Control Flow 
    4. Loop Invariant (There should be a condition that is true at the start of the loop and after each iteration of the loop) 
  7. [5-15 min] Scoping 
  8. [5-10 min] Magic Numbers 
  9. [5-15 min] Go over essentials 
    1. Declaring/initializing/assigning/modifying/etc. variables 
    2. Stream insertion and extraction (cin and cout) 
    3. Arithmetic with various data types 
    4. Strings, concatenation, etc. 
  10. [5-10 min] Dot Operator

No comments:

Post a Comment