CSE 399: C++ Spring 2007
CSE399: C++
Spring 2007
Instructor: Drew Hilton (adhilton@cis.upenn.edu)
Office hours: Tues 2:30-3:30, Wed 12-1, or by appointment in Levine 614
(Note, there are two doors- mine is on the side by the little lobby area-
I may move out to the lobby area to avoid disturbing office mates).
Class Location: Towne 309
Class Time: Monday 12-1
TAs: Chris "Skiz" Czyzewicz (eczyzewi@seas) (Thu 3-4:30, HMS lab across
from Moore 100)
and Noorain Ahmed (noorain@seas) (Thu 5-6, Fri 1-2 SEAS
computer lab in Moore)
The course syllabus can be downloaded here.
Announcements
- Apr 26,2007: Project grades are posted, as well as the final average.
The conversion to letter grades is as follows:
97.5 and above: A+
90.5-97.5: A
89.5-90.5: A-
87.5-89.5: B+
80.5-87.5: B
79.5-80.5: B-
etc.
The grade breakdown for the class is 68% As, 29% Bs, and 3% C, D, or F.
If you have questions about your project grade or final grade, please email
me. I don't plan to send everyone a detailed grade e-mail to everyone since
most of you should already have a pretty good idea what grade you got and why.
Have a good summer!
- Apr 16,2007: Demos start today. Please send me your code in advance of
your demo. You should have something working to show me for your demo, but
regardless of your demo time, you can finish your code and send it to me by
noon on Monday April 23, 2007. The more you have working for your demo, the better.
- Apr 10,2007: Demo locations. You can demo anywhere reasonable in
the engineering school. As a default, I will assume that you will demo in the
classroom. This is a good choice if you plan to demo from a laptop, and might
be feasable if you want to demo from the computer I lecture from. If you want
to demo in any other location, please send me an email no later than 24 hours
prior to your demo time telling me where you would like to demo.
- Apr 9,2007: Reminder: No class today. Have a fun Spring Fling and take
the time to work on your projects. You must signup for project demo times if
you have not done so already. I will be in the office if you have project questions.
- Apr 4,2007: Please signup for project demo times by emailing me. A table
indicating what time slots are taken/available can be found at the bottom of
this page.
- Mar 27, 2007: There were a couple problems with one of the questions
(number 1) and the solutions for it on Homework 5. Namely (1) the question had a comment stating the
address of r which does not have an address (yay for copy+paste), and
for the value of r there were two interpretations: the value that gets
passed around "under the hood" and the value you would get if you
printed r out. While I intended the former, telepathy is not a pre-req
for this course... Bring your homework 5 with you to class Monday or to one of
the TAs if you want that question re-graded.
- Mar 26, 2007: Skiz will be guest lecturing today on GUIs.
- Mar 12, 2007: More Project info at the bottom of the page. Check it out.
- Mar 12, 2007: Homework 5 is released
- Mar 02, 2007: I wrote a quick demo of SDL stuff, scroll all the way down
if you are interested
- Feb 26, 2007: I'm feeling very very sick today. CLASS IS CANCELED.
Remember to send me your project proposals. Homework 4 is due today. Have a
good spring break.
- Feb 21, 2007: In homework4, it would be better if operator+= and
operator-= took const T &d instead of T d. You can make
this change or not as you want- it shouldn't affect anything else. The
problems caused by taking T d won't show up in any of the testing
done by lltest.cpp, and thus won't appear in grading. If you want a good
LinkedList to use in the future, you should make that change. Sorry about that.
- Feb 18, 2007: Some of you are having weird issues with destructing
things. These arrise due to the way C++ handles some stuff that I haven't
talked about yet (when I wrote the solutions I did some things in a very
different way and these didn't come up, so I didn't even think about them).
Mea culpa- homework 4 will be extended 1 week and I will be
discussing what is happening tommorow.
- Feb 12, 2007: One of you asked how to do more complex output
formatting with cout. Here is a webpage
with some examples of how to do that.
- Feb 12, 2007: Solutions for Homework
2 are now posted.
- Feb 12, 2007: Homework 4 is out. Its due next week.
- Feb 12, 2007: Noorain will have office hours Thu 5-6 and Fri 1-2 in
the SEAS computer lab in Moore
- Feb 8th, 2007: Skiz will have office hours Thu 3-4:30 in the HMS lab,
across from Moore 100
- Feb 6th, 2007: Homework will now be turned in on blackboard
- Jan 29th, 2007: Homework 3 is out. It is due in 2 weeks.
- Jan 22nd, 2007: Homework 2 is out. It is due next class.
- Jan 18th, 2007: I'm moving my Thursday office hour to Tuesday.
- Jan 18th, 2007: I wrote up a quick guide to emacs
for those of you who are intereted.
- Jan 17th, 2007: The logging in/compiling HOWTO has
been updated with slightly more info for Mac users, as well as links to some
emacs downloads, additionally I've posted my office hours and TA contact info
above. I'll throw more useful emacs info up later.
- Jan 10th, 2007: I seem to have omitted a useful piece of information for
your homework. When you include fact.h, you need to do #include
"fact.h", not #include <fact.h>. Quotation marks are used
to include files in the local directory, angle brackets are used for system
include files. My apologies for this ommision.
- Jan 8th, 2007: A brief guide to logging into eniac, and how to edit your
code can now be found here.
- Jan 8th, 2007: The results were Monday: 10, Wednesday: 8, Friday: 2, and
the rest had no preference. Class will be on Mondays in the future (Monday the
15th is a school holiday, so next class will be Monday the 22nd).
However in addition to posting some resources later today, next week
on Wednesday during class time I will hold an optional session on logging into
eniac and editing/compiling/running code there. Futhermore, I'm going to push
the homework due date back to Monday the 22nd when we next have class.
- Jan 8th, 2007: Some of you grabbed me after class and told me that you had not
ever logged into eniac-l before, and didn't know how to do it. I had
assumed that you would have used this in previous classes, but apparently
that was wrong. I will be posting some information here on how
to login and edit code on eniac-l later this afternoon. If you don't know
how to do this, check back in a few hours.
Homeworks
Homeworks may be done in pairs, as long as both partners participate in the
learning experience. You must document who you worked with and in what
manner in a comment in the source code you submit.
Homework 1 is due Wed, Jan 17th
Mon, Jan 22nd at noon.
These source files go with it:
Homework 2 will be due Mon Jan 29th at noon.
Solutions for Homework 2.
Homework 3 will be due Mon Feb 12th at noon.
Homework 4 will be due Mon Feb 19th
26th, at noon.
Homework 5 will be due Mon Mar 19th
Slides
- Policies and intro to C
- Datatypes and Pointers
If you still don't get pointers, O'Reily has the pointer
chapter of Practical C online, you might check it out.
- Lecture 3 does not have slides, but here is a quick-reference of what we
covered about gdb
- Loose ends in C
- Pass by reference, Templates, Operator
Overloading, C++ style IO
- Copy constructors and Inheritance
- References and Multiple Inheritance
- STL and casting
- Skiz's guest lecture on GUIs
- Fan mail
Other stuff
Many of you are doing projects involving graphics.
I've mentioned in class that SDL is a useful thing for these sorts of
things. You can find a bunch of information by reading the relevant
man pages, but here is a brief graphics demo to get you started:
graphics_demo.c
Note that this should be compiled with the following command line:
gcc -I /usr/include/SDL -ographics_demo graphics_demo.c -lSDL
You may be unfamiliar with two of the aspects of this:
-I /usr/include/SDL tells the compiler to also look for include files in
/usr/include/SDL (which is a place it doesn't normally look
-lSDL Tells the linker to link with the SDL library
Note that unlike other things, you won't be able to run this program
remotely over Putty or SecureCRT, since it has to use the video
card.
It doesn't do too much exciting- just draws a kinda neat looking
curvy pattern- you can move the pattern around with the arrow keys,
and quit with ESC
More Project Info
Some of you were wanting to know more information on the
project, and some have asked me about some of the information that I originally
had given about it, which I've changed my mind on. Basically, we will take
the last week of class, and you will setup a time (hopefully most people during
the scheduled MWF12-1 timeslot) with me to demo. The demo should probably last
about 5-10 minutes, in which you will show me what your project does, possibly
let me play with it a bit, and I'll ask you some questions about
it (Except me to ask you what C++ specific (as opposed to just straight C) came
in handy in writing your project).
Additionally, I will want you to email me your source code in advance of
your demo, so I can look at it beforehand.
You may write your project on any platform you choose, as long as you
can reasonably demo it to me at school (in a lab or on your laptop).
The original project informatio specified that a Makefile was required- this
was when I planned to just test them all, now that I've decided to do demos,
a Makefile is not required.
If you have questions, please don't hesitate to ask me.
Project Sign ups
Please email me to sign up for a demo time during the last week of classes,
preferably during the MWF 12-1 timeslots. Demo times will be in 10 minute
increments and will be given in a first come/first serve fashion. Below is a
table indicating which timeslots are taken. Timeslots with initals are taken,
all other time slots are currently available:
| Time | Monday | Wednesday | Friday |
| 12:00-12:10 | JG | NS | ZL |
| 12:10-12:20 | ND | YS | AT |
| 12:20-12:30 | AW | MM | JR |
| 12:30-12:40 | FI | RN | JD |
| 12:40-12:50 | IC | AC | DB |
| 12:50-1:00 | AK | AA | DP |