CIS 114 Summer 2005 Homework 2 ---------- - General Instructions (GI) for all Homeworks: SEE HOMEWORK ONE. ALL INSTRUCTIONS WILL BE ENFORCED. THIS HOMEWORK IS DUE TUESDAY JUNE 7TH AT 6:00 PM. Q1 (lecture 7) Explain ADTs using the words WHAT and HOW. Three sentences is enough. Q2 (lecture 8) Study pages 15 and 16 (Insert implementation) in great detail. Understand what every step is doing. Did you understand? Don't read the question until you understand. Now explain very clearly in two or three sentences why the FOR loop starts at L (instead of at 0). You need to understand the whole implementation to answer this correctly. Q3 (lecture 9) Again, understand the WHOLE lecture. Don't just jump to answer this question. You won't do so well otherwise. Explain in three or four sentences very clearly (as if you were the professor) what the function NEW does. Don't write more than 12 lines. Q4 (lecture 10) Write all the C++ code that is necessary to build a "linked list" consisting of a single node with the number 9999 in it. Compile it and make sure it is correct. No partial credit for "almost correct." Do it without a CLASS or templates or "complicated stuff." Just the basic solution as shown in "class." Q5 (lecture 11) Why is the destructor for a linked list so complicated? Explain exactly what it is doing. You should be able to do this in two sentences. Q6 (lecture 12) Redo Q4 but now the one element list is pointing to itself. A circular linked list of one element only.