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:
- What are the data type and comparison restrictions on else statements?
- What is a sentinel-controlled loop? Give an example.
- Compare call-by-value and call-by-reference.
- Give some of the shortcomings of static arrays. (Do not answer this and the next one)
- Give some of the shortcomings of dynamic arrays. (Do not answer this and the previous one)
- What debugging methods do you know that do not involve the debugger integrated in your IDE?
- Compare structs and arrays.
- What makes conversion from binary to hexadecimal (and vice versa) very easy?
- When does breaking a program up into multiple files become useful?
- How can incorrect use of pointers crash a program?
- Give an example of a problem that can be solved easily with recursion and explain why.
- What is an exception and what can it be used for?
- What is a template and what can it be used for?
- 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!