CS 215 - Fundamentals of Programming II
TT 9:30-10:45, KC-254 (new room)
Announcements
These are announcements made in class or via email currently in effect
for this course.
Friday, April 8, Re: Project 6 correction
I realized this morning that I inadvertently introduced an error in the
specification of the explicit-value constructor for the Filing Cabinet class.
The sentence: "Each drawer (except perhaps the last) should be filled to its
maximum number of folders." should be deleted. The idea is to add each folder
in the order they are presented in the vectors, so unless the items are already
in order (which they are not), the number of folders in each drawer after
initialization is neither maximal, nor a constant.
Tuesday, April 5, Re: Project 5 typo
Steve Calderwood has pointed out a typo in the example input/output
for Part 2 of Project 5. The third example input should be: ([ ]{( )}
(i.e., it's missing the last right curly brace) to generate the
output: Extra delimiter ( found. Thanks, Steve!
Monday, March 28, Re: Project 5, Part I
I've had a couple of questions regarding Part I of Project 5 that
leads me to believe that the third criteria is somewhat ambiguous. It
says: Each word should be inserted into the appropriate list so that
the list is kept in order and does not contain duplicates using a
single function. This is similar, but not exactly the same, as the
function presented in the textbook.
Here is updated wording for the third criteria: Each word should be
inserted into the appropriate list such that each list is kept in
alphabetical order and does not contain duplicates using a single
function. This is similar, but not exactly the same, as the function
presented in the textbook.
Tuesday, January 25, Re: Warnings in Homework 2 program
Well, someone should have told me that they still get a warning even after
using string::npos instead of -1 in the Homework 2 program!
If you use -1, you'll get the following warning:
warning: passing negative value `-1' for argument 2 of
`std::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT, _Traits,
_Alloc>::substr(_Alloc::size_type, _Alloc::size_type) const [with
_CharT = char, _Traits = std::char_traits, _Alloc =
std::allocator]'
With string::npos, you get warning:
warning: comparison between signed and unsigned integer expressions
This is because dotIndex is an int and string::npos is an unsigned int. This
particular warning is not very serious unless you are using very large unsigned
ints. If you would like to get rid of the warning, you can do so by declaring
dotIndex as an unsigned int.
Monday, January 24, Re: Changes in CS Lab
This note is just to document the changes in the CS Lab that you all
discovered for me last week. Sorry about that. I guess that's what
happens when one is gone for a year and someone else takes care of
one's lab.
- To change your password, you should use the yppasswd command. It
works just like the passwd command, but you can use it on any of the
client machines in the lab (as well as csserver) and your password
will propagate instanteously to all the other machines.
- The default user shell was changed to bash and the initialization
files for this shell do not have `.' (dot, i.e., current directory) in
the path for execution. This means that to run your programs, you
need to explicitly specify the current directory using
./program
There are security reasons for leaving it this way, but if you want to
add `.' to your path, I or one of the labworkers can show you how to
do that.
- The pine mail program was not installed on the client machines.
I'm having that done this week, but you can always log into csserver
and mail your submissions from there. You can also use the web
interface to your ACENET mail account.
Links
This is a list of links to resources that may be useful in this
course.
- Dr. Hwang's list of programming
links including information on emacs, vi, Unix, and Linux.
- Cygwin, a UNIX environment for
Windows
-
Putty, a free terminal emulator for Windows that works
much better than the built-in Windows telnet client, especially for
remote access to Unix boxes and using Unix editors, and supports the SSH
protocol
-
Commands to make vi display TABs as 3 spaces instead of the default 8
spaces (and other cool vi things) courtesy of Tim DeBaillie.
However, these .vimrc commands only effect how the tabs are
displayed in vi. When the tabs are printed by a2ps, the
default 8 spaces is still used. However, a2ps has a command
line option (-T#) to have it print tabs as some number of
spaces other than the default. It is used as follows to get 3
space tabs:
a2ps -T3 file1 file2 ...
Note: you only want to do this with source code files, not makefiles
Handouts
This is a list of documents posted for this class in reverse
chronological order. Some will be available in hard copy as well.
- Thursday, April 21
- Final Exam Review Sheet (HTML) (PDF)
- Tuesday, April 19
- Thursday, April 14
Code from textbook used in lecture
- d_stree.h - binary search tree class definition
- Tuesday, April 12
- Thursday, April 7
Code from textbook used in lecture
- Tuesday, April 5
- Homework 8 (HTML) (PDF)
- Programming Project 6 (HTML) (No PDF)
- Thursday, March 24
Code used in lecture for stacks and queues
- Tuesday, March 22
Code used in lecture demonstrating queues
- Thursday, March 17
- Thursday, March 3
- Programming Project 4 - updated (HTML) (PDF)
- Tuesday, February 22
- Practical Programming Exam Review Sheet (HTML) (PDF)
- Homework 5 (HTML) (PDF)
- Thursday, February 10
- Thursday, February 3
- Thursday, January 27
Analyses, Designs, and Code used in lecture
- Tuesday, January 25
Code used in lecture demonstrating operator overloading
- prog2_3simple - program using simple Time24 objects:
Makefile.prog2_3simple, prog2_3simple.cpp
- prog2_3v1 - program with overloaded operators as member functions:
Makefile.prog2_3v1, prog2_3v1.cpp, time24v1.cpp, time24v1.h
- prog2_3v2 - program with overloaded operators as free functions:
Makefile.prog2_3v2, prog2_3v2.cpp, time24v2.cpp, time24v2.h
- prog2_3final - program with overloaded operators as friend functions:
Makefile.prog2_3final, prog2_3final.cpp, time24.cpp, time24.h
- Thursday, January 20
Code used in lecture demonstrating error handling methods.
- prog1_1simplev1 - terminate program in object on error:
Makefile.prog1_1simplev1, simpletime24v1.cpp
- prog1_1simplev2 - object sets a flag on error:
Makefile.prog1_1simplev2, simpletime24v2.h, simpletime24v2.cpp, prog1_1simplev2.cpp
- prog1_1simplev3a - object throws an exception on error, terminate program in main:
Makefile.prog1_1simplev3a, except.h, simpletime24v3.cpp, prog1_1simplev3a.cpp
- prog1_1simplev3b - object throws an exception on error, ask for input again in main:
Makefile.prog1_1simplev3b, prog1_1simplev3b.cpp
- Tuesday, January 18
Code used in lecture demonstrating classes.
This is similar, but not the same as the code presented in the
textbook. In particular, this one has no error checking.
- Thursday, January 13
- Tuesday, January 11
- Syllabus and Schedule, Part 1 (HTML) (PDF)
- Very Basic Unix (HTML) PDF)
- Very Basic make (HTML) (PDF)
- Submission Instructions (HTML) (PDF)
- C Strings Tutorial (PDF only)
(from textbook website - reading assignment for Thursday)
Back to Dr. Hwang's Home Page
Last modified April 21, 2005