(Latest Revision: 09/14/2003)
Week 03 Notes for CS 2500, Section 001 -- Fall 2003
- Take roll.
- Announcement(s)
- Test Infomation
- I put quiz review questions in the class web space.
- My tests tend to be mostly multiple-choice and short-answer
questions, plus one or two questions that ask you to give C++
code or pseudo code for some task.
- You'll need to bring a blue book
(smaller of the two sizes) to class on Monday for writing your
test answers.
- I put information files in the Asg01 directory with specific help
for the level two and final level programs.
- If you print web pages while logged into the sun ultras it
will work alright, but it will go pretty slow. For better
performance on web pages you can use one of the NT machines
or an iMac. (Printing of plain text from the Sun Ultras works fine
and is fast too.)
- This week we are reading in Carrano about recursion (chapter 2).
- This week we are reading in Andersen about CDE and the Unix file system.
- The level #2 version of program #1 is due Monday - hardcopy of
source & script on desk at start of class and and source (with
proper subject line) by e-mail before midnight.
- Next week: Quiz on Monday and finished program #1 due on Wednesday.
- Discuss requirements of third and subsequent levels of program #1. Look
at the help file for higher levels in the assignment directory.
- Do you know how to get input files off the web space for use in testing
your program?
- Do we need to discuss compiling inside JOVE?
- The compiler command option for naming the executable file:
(g++ -o
tile tile.cpp)
- Discuss compiling/debugging with jove
- How to execute the compiler "inside" jove: (C-u, C-x, C-e)
- C-x 1 "unsplits" the screen.
- How to break out of jove to a sub-shell whilst "saving your
place": (esc-s)
- Testing the program while in the sub-shell.
- How to break out of the sub-shell and return to "your place" in
jove: (exit)
- If interested, you can read the
compileHelp document
for more information about using JOVE for compiling and debugging. This
document is in the General_Info section of the class web space.
- Sometime this week, we need to look at samples of recursive
functions and programs that use them. The following files
serve that purpose:
- factorialA.cpp
- factorialA.out
- factorialB.cpp
- factorialB.out
- inorderNonRecursive
- inorderRecursive
- runTimeStack.cpp
- runTimeStack.jpg
- runTimeStack.script
-
- Instructor can access and test run some of the above in his directories: sun::/user/dept/john/Classes/CS2500/Examples and
sun::/user/dept/john/Classes/CS2500/RuntimeStack
- Discuss recursion
- Examine non-recursive and recursive versions of in-order
traversal of a BST. Show the non-recursive first, and then
the recursive. This is good to indicate the power of
recursion. (Source: Stubbs and Webre)
- Discuss Activation Records and implementation of recursion.
Use the evaluation of factorials as the working example.
- Write out a "tree" to show how inefficient it is to calculate
n choose k with recursion.
-