Homework 1 UCR CS10: Introduction to Computer Science Spring Quarter 2004, Lecturer: Kris Miller Due Wednesday, April 7 before 8:00pm by web turnin. ------------------------------------------------------------------------------- Turnin: Turnin this assignment to the folder, hw1, using the electronic turnin linked to from the class webpage. For homeworks only, you may turnin .doc (Microsoft Word) or .txt (Notepad) files. You may also turnin the homework as a .cc or .cpp (C++ source) file. Be sure to turn it into the correct folder. At best, you will be penalized 20%. At worst, your homework may not be graded at all. ------------------------------------------------------------------------------- Note: Collaboration policy for this homework assignment Collaboration on this homework is strongly ENCOURAGED. The homework is intended for practice, not assessment -- most people who turn in decent work should get most if not all points for this assignment. Forming study groups is strongly encouraged. You shouldn't simply copy answers from any source -- each other, the book, the web, other books, previous solutions, etc. But you can certainly discuss how to solve the problems, look over each others solutions and help "debug" them, compare answers and redo problems if you determine your answer is wrong, and most importantly, explain concepts related to the problems and solutions. ------------------------------------------------------------------------------- 1. Self-test Exercise #1-2 (Chapter 1, #2) 2. Self-test Exercise #1-4 3. Self-test Exercise #1-6 4. Self-test Exercise #1-15 5. Self-test Exercise #1-22 6. Write an algorithm you could give to a complete stranger that explains how to throw a surprise party for your best friend. Assume this stranger knows nothing about you, your friends, or how to throw a party. The more precise your steps are, the more likely you will get the party you desire. I will put in the solution for homework 1 one of the more interesting, creative submissions (anonymously, of course), so have fun with this one. 7. Self-test Exercise #2-2 (Chapter 2, #2) 8. Self-test Exercise #2-3 9. Self-test Exercise #2-7 10. CodeMate Programming Project #6 (Chapter 1) You can find this problem by clicking on the CodeMate link from the class page or by following the instructions in the CodeMate enhanced textbook. If you did not get the required CodeMate enhanced textbook, you can buy CodeMate by following this link as well. Once on the website for CodeMate, click "CodeMate Index" from the blue menu on the left. Then click Chapter 1 from the list of chapters and choose #6 from the Programming Projects. When you have completed this program, copy and paste the entire program to your homework file.