Peer Instruction: Unit 2 Multiple Choice Questions
--------------------------------------------------------

.. mchoice:: bs-strings-05-08
    :author: Beth Simon
    :practice: T
    :answer_a: "Bob"
    :answer_b: Bob
    :answer_c: The address in memory where "Bob" is stored
    :answer_d: new String("Bob")
    :correct: b
    :feedback_a: Incorrect! name stores the string Bob, not including the quotes.
    :feedback_b: Correct! Bob is stored in the variable name after the code is executed.
    :feedback_c: Incorrect! The address in memory is not stored in the variable name. Instead, the string Bob is stored.
    :feedback_d: Incorrect! Bob is stored in the variable name after the code is executed, not new String("Bob")

    What is stored in the variable name after the following line of code is executed?

    .. code-block:: java

        String name = "Bob";

.. mchoice:: bs-objects-11-07
    :author: Beth Simon
    :practice: T
    :answer_a: 1-A, 2-C, 3-C, 4-D
    :answer_b: 1-B, 2-B, 3-A, 4-D
    :answer_c: 1-A, 2-C, 3-D, 4-D
    :answer_d: 1-B, 2-C, 3-D, 4-D
    :correct: d
    :feedback_a: Incorrect! Scenario 1 creates a picture from "filename.jpg." Scenario 2 uses 'other' as the picture that it is copying. Scenario 3 uses aNum and bNum to determine the dimensions of the image. Scenario 4 uses aNum and bNum to set the width and height as the same dimensions as another image.
    :feedback_b: Incorrect! Scenario 1 creates a picture from "filename.jpg." Scenario 2 uses 'other' as the picture that it is copying. Scenario 3 uses aNum and bNum to determine the dimensions of the image. Scenario 4 uses aNum and bNum to set the width and height as the same dimensions as another image.
    :feedback_c: Incorrect! Scenario 1 creates a picture from "filename.jpg." Scenario 2 uses 'other' as the picture that it is copying. Scenario 3 uses aNum and bNum to determine the dimensions of the image. Scenario 4 uses aNum and bNum to set the width and height as the same dimensions as another image.
    :feedback_d: Correct! Scenario 1 creates a picture from "filename.jpg." Scenario 2 uses 'other' as the picture that it is copying. Scenario 3 uses aNum and bNum to determine the dimensions of the image. Scenario 4 uses aNum and bNum to set the width and height as the same dimensions as another image.

    Match the scenario to the constructor call.

    .. image:: https://i.postimg.cc/DwWb2xyj/lecture11-Q07.png
      :width: 400
