CS 2503 Fall 2002 Information

The grades were posted this morning but due to a mechanical error many of them were initially posted wrong, then corrected. There may still be traces of the incorrect grades in the system.

Syllabus in HTML and Postscript. Includes office hours (which are wrong, see homepage), text, and general rules. Assignments and other notices will be posted here as the semester progresses.

Dec 5: If anyone cares, the component input/output portion of the project 3 code is now working. This is what we gave up on in Tuesday’s lecture. The code includes some additional string operations.

Project 3 requirements: just build and execute a set of test cases for the symbol table class and the Matrix class. Writing good test cases requires that you understand the code and may require you to expand or modify the main() test driver code provided. Turn in listings of any code you write (not my code, unless it’s been modified in an interesting way) with runs and a description of your test plan. Why do you believe your tests are good?

Project 3 is due Monday. I won’t deduct points as long as I have it before the end of the finals period.

Expect the final to be very much like the first two exams with the addition of basic object-oriented syntax. If you can answer valid/invalid questions about code like the examples of Chapter 6, if you can trace code like the Ratio example (6.4 question 3) you know enough object-oriented material.

Nov 19: Please turn in project 3 today. For part 3, my standard is that you derive an estimate of the fair premium from your simulation by some reasonable, documented process. I'd like to see all three versions of you program. I do not want you working on project 2 past today; we need to move on.

Nov 19: Project 3 will be an application of the Gaussian Elimination code found in the case study following section 8.3 in your text. We will design and code an object-oriented solution in class with what remains of the semester. Lecture notes and other materials for project 3 will be here.

Nov 19: Reading/study assignment.
Handout: chapters 2,5,6 from C++ FAQs by Cline and Lomow.
Review string variables (for proj3) section 7.4, table 7.3, figure 2.6.
Chapter 6 project 3: design and work out some coding details. It's too big to complete for homework, but make sure you could program it.
Section 6.4 question 3: body of object-oriented code with errors. Try to find and correct all the errors, then compare your work with the solution in the back of the book. Make sure you understand the rules behind each correction.
Chapter 8 through the case study following section 8.3.

Nov 19: Supplemental book recommendations.
If you ever need to do C++ for real, you'll want to have something better than Hanly. I recommend the following:
C++: The Core Language by Satir and Brown (O'Reilly, 1995), available electronically through the TU library.
The annotated C++ reference manual by Ellis and Stroustrup (Addison-Wesley, 1990), on reserve through the end of this semester.
C++ FAQs by Cline and Lomow (Addison Wesley, 1994).
And you'll need a really good C book, since the above all assume you can code in C. Kernighan and Ritchie, 2nd edition, is the standard.

Nov 12 (pm): I just corrected the gcd program linked below and added a bunch of commentary, including notional exercises.
Several people have asked about study questions. I am not excited about any of the questions in chapter 10, but here goes:
Ch 10, project 1: (secant for finding nth-roots): Since the derivative of the function is easy to calculate, compare Newton. Write both versions, instrument them to report the number of times pow() is called, and have main() call each for a range of parameters and tabulate the results.
Section 10.3 question 1.
Section 5.7 questions 2&3.
Section 5.3 question 1 (read q2). Solution is in the back, try it before you look!
Chapter 4 project 5 (pi series p. 152) compare with the series given in section 4.1 question 1 (p. 115). Code the approximation of pi by the formula on p. 152 dealing with the alternating sign and the denominator progression as cleanly (elegantly, efficiently, clearly) as possible. Philosophy question: compare both with the Monte Carlo approximation from Oct 17th.

Nov 12: Test postponed to Thursday so we can have a review session today. Contact me at x3870 if you can't take the test Thursday morning.

Nov 12: Files used in review: GCD and lander.

Oct 29: We have now completed the material for Exam 2. It will cover scientific algorithms, primarily the theory in chapter 10 and project 2 plus the programming techniques and language features needed to implement those algorithms.

Oct 29: The final unit of the course begins with some theory that is not in the book. I have partially updated my selection sort program and will continue to develop the proof Thursday. You will be responsible for the concept of a loop invariant (and the corresponding concept for recursive algorithms) on the Final, but you won't have to write a full proof.

Oct 29: Exam 2 will be on Nov 12th. Project 2 will be due Nov 19th. Project 3 will be implementing Gaussian Elimination and will be due on the last day of classes (a Monday). It looks like there is complete code for this algorithm in the textbook, so I will have to provide some additional specifications to make it interesting. I believe I will focus on the creation of good test cases. Watch this space.

New material: Section 5.6 (recursion), Chapter 6 (object syntax), and chapter 8 (Matrix objects and Gaussian Elimination).

Oct 24: A Mathematica notebook on the pogo stick simulation.

Oct 22: A first draft of the Project 2 Handout is posted. This includes your lab assignment for this week!

Oct 17: The homework on chapters 5 and 7, originally assigned on September 10th will be accepted for 10 points on Tuesday, October 28th.
The homework on chapter 4, originally assigned September 24th, will be accepted for 10 points the following Tuesday, the 5th of November.
The second midterm will be in the first or second week of November, we'll discusss it in class.

Oct 17: My version of Selection Sort.

Oct 17: The Monte Carlo approximation of Pi program developed in class today. How many darts does it take to get a good approximation?

Oct 17: This is a link to the source code for the simulation library you used in Project 1. I got the code for the frand function (Box-Muller transform) from this page.

Oct 9: Exam 1 Statistics

Oct 9: NOTE We are changing the lab and lecture sequence. Instead of doing Matrix manipulations we are going to do most of Chapter 10 first, then come back to Matrix arithmetic after we learn the object-oriented syntax. That way we can follow the presentation in chapter 8 more closely.

Oct 9: HOMEWORK I will accept solutions for the homework assigned on chapters 2&3 (posted September 9th) on Tuesday the 15th for up to ten point toward your exam total. To receive full credit you need to work carefully, think deeply, and communicate clearly.

Sep 28: If you cannot turn in a project and be well-prepared for the exam, send me an email by noon Tuesday with a description of your progress and what problems you are having. You will get an automatic one-week extension.

Sep 28: Project 1 submision instructions: When your program is working, make it presenatble. The code should be laid out in an attractive and readable way. Comments should be used intelligently to guide the reader and to explain the purpose or operation of anything that is not clear by itself. Variables (and functions, if you use them) should have well-chosen names. A good name is one that guides the reader's intuition toward understanding the program.

You will need to choose a production run for the program. Begin by using your student ID number (without leading zeros) as the run_id (or seed) value. If the result is undesirable for any reason (too short, too long, no clear correlation) add one to your id and try again. Produce two plots (from Excel) using different channel pairs and the same run_id number. One plot should show substantial correlation and the other an uncorrelated relationship. Label the plots, indicating the offset from your student id (but not the id) in your report.

The report should be formatted as a "user manual" for your program, with the included plots serving as examples. Reference your original theory report; do not duplicate the theory material.

In addition, include a simulated reply to my email (in my role as your programming manager) in which you describe the difficulties you had to overcome in writing the program, significant design choices, and anything else that you want to say about the project. Your final submission will be the program source code, the user manual, and your reply to the advice email. If it is less than five pages or more than ten you are probably doing something wrong.

Sep 24: Recommended problems for chapter 4:
Section 4.3 Questions 1-3: pick one and explore it in detail.
4.3 Q 5
In seciton 4.4, study the arithmetic assignment operators (first half of the section). Use the output format control stuff as a reference when writing your projects.
4.4 Q 2: predict results, write and run program to confirm them.
4.4 Q 3: copy your program for Q 2 and modify it, run to verify same results.
4.5 reference material.
4.5 Q 2
Chapter 4 projects: Read through the problem descriptions and think about how to program them. Be prepared to discuss them.

Project 1 is due on the first of October by 5 PM. Exam 1 will be in class on Thurday October 3rd. If you have a problem, please see me well in advance of these dates.

Sep 19: Instructions for using the simulation library in project 1.

Sep 19: Here is the modem program we developed in class. Compare with figure 4.16 in the text.

Sep 16: The documents for the second phase of project 1 are ready. The object file you will need to link to will be available in Lab Thursday. Here are the memo from QC, an email from your boss, and the header file.

Sep 12: Here's a program to puzzle over. On paper, trace its execution. Optionally, compile and run the program to confirm your trace. What sequence is it computing? Then use algebra to show how it is computing that sequence.

Sep 10: Recommended problems:
Section 5.1 questions 3 and 4
Project 5.4 (you will need to read some of section 5.3)
Section 7.1 question 2
Section 7.2 question 1
Study example 7.5 in section 7.3 carefully. Modify it to provide both the value and location (index) of the largest element in the list.

Sep 10: The first part of project 1 has been assigned and is due next Tuesday, September 17th. Here it is.

Sep 9: The phone number in M207A is x2831, just in case anyone want to call me during office hours. I am in classes Monday and Wednesday afternoons; you can reach me at my normal number the rest of the time.

Sep 9: Your first project will have three deliverables, with the first being due Tuesday the 17th. I will hand out the first phase assignment (and make it available online) tomorrow.

Sep 9: This week's lectures will focus on chapter 4 and the assigned portions of chapter 7.

Sep 9: Recommended problems from chapters 2 & 3:
project 2.10: pseudocode a solution
questions 1 and 2 for section 3.6
project 3.10: code (on paper) decision and output, making provisions to include the name of the polutant if a limit is violated.
project 3.3: try to sketch a solution. Why is it hard to do this with just the material given through chapter 3?

Sep 3: Remember, you may need to hit refresh to see the latest changes to this file.

Sep 3: More on reading the text: The questions in the text are not assigned as homework but you should read most of them for each chapter and think through how you would solve them. Exam questions will be very simlar to the exercises in the book. Note that there are answers to many of them in the back of the book. Also, I welcome questions in class or in office hours about anything in the text.

Sep 3: Reading list: chapters 2 & 3, then sections 5.1, 5.2, 7.1-3, and then all of chapter 4. This is roughly where we will cut off the material for the first exam. Read through it all at least once as soon as possible, then go back and study it more carefully.

Sep 3: an example using the switch statement. And, the program of figure 5.3.

Aug 29: slides: Hello world and Keywords table.

Aug 28: Office hours: Monday and Wednesday, 9:30 to 11:30. Tuesday and Thursday, 1 to 3. Also by appointment.

Aug 27: My office hours are going to be different from those on the syllabus. Sorry about that. See my homepage for updated information.

Aug 27: Please read chapter 2. Chapter 1 won't hurt you, but we won't spend any time on it, except figure 1.10 on page 16.

Aug 27: The lab will be held in one side of L1 (NOT L1A), downstairs in KEP, South East hallway. I think the South East stairwell is still alarmed, use the main stairs.

Aug 27: The lab instructor's home page: Parijat Kar.