This is the home page for CS253, Problem Solving with C++,
a CSU Computer Science class.
Click on the links, above, for other class pages.
Cutoff | Grade |
---|---|
≥ 88 | A |
≥ 76 | B |
≥ 64 | C |
≥ 52 | D |
< 52 | F |
~cs253/bin/grade
will now show your final exam score (FINAL),
your curved final exam score (FINAL-curved), your total score (TOTAL),
and your letter grade (LETTER). The letter grade that you see is
the one that you will get.
Read this if you have questions about your grade.
There are three landlocked countries surrounded entirely by just one other country:
A student asked for the average scores so far.
Homework #1 | 2.77 | Quiz #1 | 3.33 | Midterm #1 | 5.86 |
Homework #2 | 3.88 | Quiz #1 curved | 4.11 | Midterm #1 curved | 10.41 |
Homework #3 | 3.79 | Quiz #2 | 2.45 | Midterm #2 | 6.30 |
Homework #4 | 3.83 | Quiz #2 curved | 3.98 | Midterm #2 curved | 10.67 |
Homework #5 | 2.89 | Quiz #3 | 2.89 | ||
Homework #6 | 3.65 | Quiz #3 curved | 4.01 |
My office hours during finals week will be in my office, CSB 246.
There will be no extra credit.
I’m pleased to see that several students have turned in HW6. However, it is distressing that most of the submissions, so far, ignore the comparison functor in favor of direct comparisons in some methods. I’ve added a new test program with incomparable types. Try it.
insert(iterator, iterator)
should return void
.
HW5 scores are now available: ~cs253/bin/grade HW5
Thanks to Jamie for pointing out several errors in HW6, which are now corrected.
find
methods must be const.
insert(iter, iter)
takes iterators that are not
necessarily Smaph
iterators.
HW6 now has a third test program. It uses a comparison functor and a C++11 range-based for loop.
If you erroneously try to compile a *.h file, it will create a compiled
version called *.gch. This will confuse you, because your *.h file
will be ignored in favor of *.gch. Remove *.gch files when you see them,
and have your “make clean” rm *.gch
.
Since Wednesday’s recitations were cancelled due to snow:
HW5 is now due Monday, April 22nd, at 3:00ᴘᴍ.
Midterm #2 scores, raw & curved, are now available.
The earth is closest to the sun around January 4th. This has nothing to do with the seasons, which are not the same in the northern and southern hemispheres.
HW4 grades are now available.
The executable is called snake
, singular, not plural.
HW5 is now available.
I will have no office hours Monday, April 8th. I’ll be in CSB 250 (corner room) at that time if you want to talk.
The gcov lab has an excellent example of operator>>
.
My read-only solution to HW3 is available: Words.h Words.cc
I will not have any office hours during spring break.
HW4 is now available.
The midterm has been curved. ~cs253/bin/grade
On HW3, the method operator=(bool)
has been changed
to set_case_independent(bool)
. There were problems with trying to do:
w = "e___e";
because that called operator=(bool)
instead of operator=(std::string)
.
Also, you have to pay attention to the various settings (dictionary, guesses, case-independent flag) at the time the the data is requested. You’ll get the wrong answers if you compute the answers earlier, and then somebody changes a setting on you.
#include
guards.
HW3 is now due one week later, on March 13.
HW3 is now available.
I just sent the following to my teaching assistants:
As you recall, there was a question about copy ctors on the midterm:
class Whatever
. Yes, the declaration.
The best answer is:
Whatever(const Whatever &); // pass argument by const reference
This answer, which will fail if trying to copy a const object, is also acceptable:
Whatever(Whatever &); // pass argument by non-const reference
Then there’s this answer. This is invalid C++ (see below), but, because I incorrectly stated in class that it’s valid, this should also be granted points for Midterm #1 only. If a student comes to you with the following, they should get a point for it:
Whatever(Whatever); // pass argument by value (INVALID C++)
In all cases, it’s also acceptable to put in a variable name:
Whatever(const Whatever &w); // pass argument by const reference Whatever(Whatever &w); // pass argument by non-const reference Whatever(Whatever w); // pass argument by value (INVALID C++)
Why is the third one invalid? It seems reasonable, at first: we want to pass the argument by value. Just copy the actual parameter, from the calling code, to the formal parameter w. Wait--copy? How do you copy an object? You call the copy constructor. But this is the copy constructor! We can’t call the copy ctor from the copy ctor—that’s infinite recursion. That’s why we must use a reference.
That’s why the third one is invalid C++, and will not compile. But we shouldn’t punish the students for my error, so they get a point for it.
The last question on the midterm was:
There are two answers:
My office hours will actually be in my office, CSB 246, Monday February 25 and Tuesday February 26.
HW2 scores are available: ~cs253/bin/grade HW2
Specify HW2
to get detailed feedback.
Q1 has been curved. ~cs253/bin/grade
The HW2 writeup has been improved after today’s class, with many clarifications.
HW2 is now available.
HW1 has been graded. For detailed information:
~cs253/bin/grade HW1
My read-only solution to HW1 is available here.
HW1 is now available.
Please, no onions in the Computer Science Building, including the Linux Lab. One of our faculty has a severe allergy.
Recitation (lab) the first week is optional. Attend if you need help logging in, editing files, using g++, or general help with HW0. If your recitation was Monday, then you may attend one of the other recitations (see the syllabus) this week.
If I clarify an assignment, change a due date due to weather, etc., I’ll announce it here.
Modified: 2013-04-26T22:46 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |