Syllabus
Welcome to CS 368, the C++ programming section! C and C++ are fast: they are compiled (no interpreter overhead), don't have background garbage collection, and give you control over memory layout. Both are excellent choices when performance matters. C code can usually be compiled by a C++ compiler, but C++ offers many features beyond what C alone has, including classes, exceptions, templates, functional programming, and a rich standard library. Becoming proficient with C++ will enable you to build sophisticated and performant applications and systems.
Revisions to Syllabus
- Mar 21: added office hour details
Office Hours
- Friday, Mar 22: 10-11am
- Wednesdays: 2-3pm (starting Mar 27)
Location: COMP SCI 7370.
Learning Objectives
- Read and understand C++ code
- Write C++ programs making use of the abstractions provided by the language
- Understand the lower level details of memory management like pointers and references
- Organize and build multi-file projects using the make tool
- Solve real world programming problems using C++ as a tool
Lecture
We will meet once a week in person and I'll also post recordings between lectures I'll expect you to watch on your own before lecture. See schedule here. The recordings will be heavy on programming demos -- to get the most out of them, I recommend following along, writing code yourself and pausing as needed.
I'll ask questions during lecture via TopHat. You can earn points by answering questions (and getting them correct).
Readings
We'll cover everything you need to know in lecture, but if you're looking for extra resources, you could consider the following:
- Tour of C++, A (C++ In-Depth Series), 3rd Edition by Bjarne Stroustrup
- Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14, 1st Edition by Scott Meyers
Note that O'Reilly books are available for free via the Madison Public Library (the Meyers book is in the collection). To get access:
Communication
We'll message the class regularly via Canvas announcements. We recommend updating your Canvas settings so that the "Announcement" option is "Notify immediately" so that you don't miss something important.
We have various forms page for a summary of all class forms.
Grading
This class is pass fail. To pass, you need to earn at least 100 points. Ways to earn points:
- project: there will be 6 project milestones, each with 5 tests. Passing a test gives you 4 points.
- quizzes: there will be 6 quizzes, each with 5 questions. Getting a question right gives you 1 point.
- TopHat: I'll sometimes ask TopHat questions during lecture. A correct answer is worth 1 point; an incorrect answer will get at least 0.5 points.
- other: I might offer other opportunities for points as we go
Academic Misconduct
TopHat
Submitting TopHat answers while not physically present in class mis-represents participation, and is considered misconduct.
Project
Code copying between students is not allowed in this course. Copying includes emailing, taking photos, looking while typing line by line, etc. Copying code then changing it is still copying and thus not allowed. Lock your compute when it's not attended.
Citing ChatGPT (or other LLMs): it's allowed with proper citation. To cite, have a directory named "chats" in your repository. It should include complete screenshots of your interactions with these tools.
Citing Online Resources: you can copy small snippets of code from stackoverflow (and other online references) if you cite them. For example, suppose I need to write some code that gets the median number from a list of numbers. I might search for "how to get the median of a list in python" and find a solution at https://stackoverflow.com/questions/24101524/finding-median-of-list-in-python.
I could (legitimately) post code from that page in my code, as long as it has a comment as follows:
# copied/adapted from https://stackoverflow.com/questions/24101524/finding-median-of-list-in-python def median(lst): sortedLst = sorted(lst) lstLen = len(lst) index = (lstLen - 1) // 2 if (lstLen % 2): return sortedLst[index] else: return (sortedLst[index] + sortedLst[index + 1])/2.0
In contrast, copying from a nearly complete project you find online (that accomplishes what you're trying to do for your project) is not OK. When in doubt, ask us! The best way to stay out of trouble is to be completely transparent about what you're doing.
Quizzes
There will be a short Canvas quiz due at the end of most Wednesdays. Make sure you know the rules regarding what is allowed and what is not.
Allowed
- however much time you need
- discussing answers with classmates who are taking the quiz at the same time
- referencing texts, notes, or provided course materials
- searching online for general information
- running code
NOT allowed
- taking it more than once
- discussing answers with anybody outside of the course
- discussing with classmates who have already completed the quiz when you haven't completed it yourself yet
- posting anything online about the quizzes
- using such material potentially posted by other students who broke the preceding rule
- getting TA/instructor help on quiz questions prior to the quiz deadline