Honors/AP Computer Science Using C++                                                       Name:
Final Exam Review Worksheet #1                       

Follow the instructions closely for each exercise. Neatly label and organize your answers on lined paper.

  1. Look over the chapter vocab lists for chapters 12 through 19. These lists can be found on our Web site. Many of the words are bold in the chapter readings. Identify 3 words from each chapter that are most likely to be represented in exam questions and write their definitions.

  2. Look over the chapter objective lists for chapters 12 through 19. These lists can be found on the first page of each chapter in the textbook and on our Web site as well. For each chapter, write the objective numbers for the 3 objectives that you feel will be emphasized the most on the final exam.

  3. Write 3 exam exercises that require a C++ student to write syntactically correct code segments that demonstrate concepts, syntax, structures, and objectives learned in chapters 12 through 19. Make sure that each exercise is specific and narrow enough in scope that the answer is about 5 to 15 lines of code. Provide the code solution for each exercise. If possible, check your answers using C++.

    Example:

    Write a for loop that uses a loop variable named counter and iterates 10 times. The computer should print the value of counter on a new line on each iteration.

    Answer:

    for (int counter = 0; counter < 10; counter++ )
    {
            cout << "The value of counter is: " << counter << endl;
    }

  4. Write 3 exercises that require a C++ student to thoroughly desk-check syntactically correct code segments. The code segments should only be 10 - 20 lines long. Use proper indentation and pretty-printing so that the code segment is easy to read. Be creative with your exercises but try to make sure that they require a student to use concepts that were covered in chapters 7 through 19. Provide the solutions to each exercise. If possible, check your answers using Visual C++.

  5. Example:

    Show the list of values taken by the variable A and circle its last value as the following segment executes:

    int x = 5;
    int a = 0;

    while (x >= 3)
        {
            x = x - 1;

            if (x % 2 == 0 )
            {
                a = a + x;
            }
            else
            {
                a = a - x;
             }
        }

    Answer: a = 0 4 1 3

  6. Look over the objectives for chapters 12 through 19. Choose 3 objectives that could rather easily be represented on the exam as short answer/essay questions. Rewrite them as short answer/essay questions that could likely be used on the final exam. Provide the short answer/essay question answer for each one in paragraph form.