CS1411 - Introduction to Programming Principles I

Final Exam, written Part

Please answer five (5) of these questions: For each question, write about 3-5 sentences. Please include at least two facts per answer. Please make sure that I know which questions you're answering:

  1. What are the data type and comparison restrictions on else statements?
  2. What is a sentinel-controlled loop? Give an example.
  3. Compare call-by-value and call-by-reference.
  4. Give some of the shortcomings of static arrays. (Do not answer this and the next one)
  5. Give some of the shortcomings of dynamic arrays. (Do not answer this and the previous one)
  6. What debugging methods do you know that do not involve the debugger integrated in your IDE?
  7. Compare structs and arrays.
  8. What makes conversion from binary to hexadecimal (and vice versa) very easy?
  9. When does breaking a program up into multiple files become useful?
  10. How can incorrect use of pointers crash a program?
  11. Give an example of a problem that can be solved easily with recursion and explain why.
  12. What is an exception and what can it be used for?
  13. What is a template and what can it be used for?
  14. We discussed several things that you should not use a computer for. Give one example of a rule that is commonly violated and give a possible explanation why.

Bonus question (to be used as a 6th question:)

  • Write a short (6-8 lines) piece of Vogon poetry (for up to 4.2 extra points)

Final Exam, Programming Part

Get the files finalmain.cpp, finalimpl.h and finalimpl.cpp. Fix finalimpl.cpp that it implements all the functionality described in the header file.

Please note: Your implementation should not rely on the test cases, but rather implement what is stated in the description.

Your programs should include your name in the top part!

Submission

Please email your file (only the finalimpl.cpp file!) to Yaoqin Jing once your done.

Lab computer users: Do not log of from your computer! Leave it running with your program open! This is to ensure that your program is not lost if the submission failed

Laptop Users: Please see Yaoqin Jing to check if the assignment actually arrived.

Warning: If you do not check that we have your assignment and we can't find it it will be a 0!