csci 20 :: book learning challenge 15 (due tues, may 10)
Submitting your work: Complete this exercise on your own.

Fill in all of the "Answer" boxes, then print the answer grid that you see after you press "Prepare for printing".

Staple all pages together and submit to the instructor on the date listed above.

Questions:

Download this code when answering the questions on today's challenge.

READ: C++ Pointers, Pointers and , Pointer to C++ classes then answer the following:

Your name:
  1. Refer to today's sample code. Write the C++ code to display the address of roomOne.
    Answer:
  2. Refer to today's sample code. What is the name of the Room pointer declared in main?
    Answer:
  3. Refer to today's sample code. Write the C++ code to assign the address of roomOne to the Room pointer declared in main.
    Answer:
  4. Refer to today's sample code. Write the C++ code to set the name of the current room (using the pointer) to "Front porch".
    Answer:
  5. Refer to today's sample code. Write the C++ code to set the description of the current room (using the pointer) to "A classic front porch with a swing.".
    Answer:
  6. Refer to today's sample code. Write the C++ code to describe the current room (using the pointer and the describe function). What is the output?
    Answer:
  7. Refer to today's sample code. Write the C++ code to assign the address of roomTwo to the Room pointer declared in main.
    Answer:
  8. Refer to today's sample code. Write the C++ code to describe the current room (using the pointer and the describe function). What is the output?
    Answer:
  9. Add the following code to today's sample code. What is the output?
    roomOne.setNextRoom(&roomTwo);
    cout << roomOne.getNextRoom()->getName() << endl;
    Answer:
  10. Attach a sketch of your map for your Project 4 game.

Total points for this book learning challenge:

150 points