ICS 45C Spring 2022
Reinforcement Exercises


What are these reinforcement exercises for?

To allow you to engage with the details of the lecture material as we encounter it and it's fresh in your mind, we'll have eight sets of reinforcement exercises in this course. About once a week, I'll be posting a set of reinforcement exercises. Those exercises will generally be due about a week after they're posted, though circumstances may require us to modify that norm slightly as the quarter progresses. Each set focuses on recently-covered material.

The best way to think about the reinforcement exercises is like this: If you've attended a particular week's lectures, watched any additional pre-recorded videos, read the notes, and have engaged with the material along the way, these are questions you should be able to answer or tasks you should be able to complete. Going forward, if you take courses for which this one is a prerequisite, these are things your instructor will assume you already understand, which means an inability to understand them will make that upcoming coursework problematic for you. If someday you list C++ on your resume among the knowledge and skills you claim to have when you're applying for a job, these are questions that could arise in an interview — I'll have asked some of these in job interviews I've given in the past, in fact — that you ought to be able to answer, and whose answer you ought to be able to explain in detail. (When you list something on your resume, you're making the claim that you know about it; it's not uncommon for an interviewer to ask questions that verify that knowledge, even for people with a lot of prior experience, but maybe especially for candidates who are just starting out.)

You'll find that some of the exercises ask for things that are straightforward, while others are more open-ended, but that many of them ask you for a justification of your answer. While we aren't looking for unnecessarily long-winded responses, and while a lot of the goal here is holding yourself accountable, we do want you to be able to explain yourselves, as you would need to in a job interview or other circumstance where you're trying to convince someone that you've obtained knowledge and skills. As in a job interview, the necessary depth without unnecessary BS is the name of the game here. As this is not a course about memorizing facts, but instead about understanding why things are the way they are — why we use C++ language features the way we do, why C++ is different from other languages you may have learned in the past, and so on — then the best self-assessment tool I can give you, in my view, is one that makes you ask yourself that all-important question: Why? So a lot of these questions will focus on that.

It should go without saying, but sadly can't, that we expect these exercises to be completed solely by you. They are not group activities. They are subject to the same academic honesty policies as everything else in the course, which you can find described in detail in the Course Reference.


How will these be graded?

Each problem will have a stated point value, and the total points for an exercise set will be weighted to 3% of your overall course grade, as stated in the Course Reference, even if the point value for one exercise set is different from another; the sets are all equally weighted, ultimately.

At least half of the credit on every problem will be given to someone who made an honest attempt to solve it and justified what they did with an explanation, even if the solution turns out to be misguided. We reserve the right to determine what an "honest attempt" is and this is non-negotiable. Thinking about the spectrum of possibilities, a fully correct solution is obviously an honest attempt, while saying "I don't know!" or writing about something completely unrelated is obviously not an honest attempt. The line is drawn at a reasonable point in between, which we'll decide when we grade them, but will not be willing to split hairs over afterward.

For some of the problems, we'll grade the other half of the credit more carefully; for others, frankly, we may not have the time (and an honest attempt will be worth full credit), though we will do our best to provide as much feedback as we can.

Notably, we will not under any circumstances reveal ahead of time which of the problems we'll be grading more thoroughly than the others, so please don't ask; this is not a system to be gamed, but an opportunity to assess your own learning and progress in the course, which is your foremost goal here. We also will not pre-grade your work; while we're happy to answer questions, generally, we won't be willing to definitively verify that your solutions will receive full credit or that they constitute "honest attempts" before the work is actually graded after it's due.


Will you provide solutions?

Yes. Solutions will be provided after the due dates have passed.


How do I organize my answers?

When each set of reinforcement exercises is released, a project template will be added in the ICS 45C VM, which you can obtain by refreshing its environment. (Instructions for doing this will be included in the exercise set.) You'll be best off creating a project directory from that template and doing your work directly on the ICS 45C VM within that directory, with all files that you need to submit included in the problems directory. Each problem will make clear which files will need to be submitted and precisely what their names must be, requirements you'll need to follow if you want to receive credit. For each question we ask, you'll submit a separate file (or, occasionally, more than one; the instructions for each exercise set will make this clear).

The files you submit will be in one of three formats.

C++ source files (.cpp files)

These are what they sound like; they're files that contain C++ source code.

C++ header files (.hpp files)

You may also sometimes be required to submit one or more C++ header files, which would contain declarations for things defined in your C++ source files.

PDF documents (.pdf files)

Many of the questions — particularly after the first couple of weeks of the course — will require a written answer rather than C++ code. These will be required to be submitted in a format called PDF. Note that PDF is a file format, not just a naming convention — so, for example, if you submit a text file renamed with a .pdf extension, that's not a PDF.

Your answers are required to be primarily typed into a word processor, as opposed to written down and scanned (or printed out and scanned), such that we're able to read them (and also programmatically extract the text from them) easily. If all you submit is a PDF containing a scanned image, no credit will be offered. You may occasionally draw a diagram, which you can certainly include as an image within your document, but the prose that you write will need to be typed. There will be no exceptions to this rule.

Your best bet for editing your documents directly on the ICS 45C VM is to use LibreOffice Writer, which is a word processor that is already installed. (Click the "start" icon in the lower left corner of the screen, which will pop up a menu that lets you launch applications. If you see LibreOffice Writer in that menu, click it. If not, start typing LibreOffice until it shows up in the list, then click it.)

Note that LibreOffice Writer doesn't save documents in PDF automatically, and you probably won't want to create your PDF until you're done with a question; while you're still editing it, best to save it in LibreOffice's native ODT format. When you're ready, though, you can export each document into PDF format by opening the File menu, then selecting Export As, and then selecting Export As PDF...; you'll find that there is also a toolbar icon just under the menu bar that can do this, as well.

Of course, you can use any editor you'd like to create your PDF file, but I have to emphasize that what you submit must be a PDF.

File naming matters

To reiterate something said above that is vitally important, there will always be a requirement about the precise names that must be given to your files. You must follow these requirements completely and correctly — note that spelling, capitalization, and spacing count here — in order to receive credit for your answer to each question.

(Canvas sometimes modifies filenames after submission; this turns out to be harmless, as the original filename is preserved.)

No credit if submission instructions are not followed

You can submit your solution to each problem into the corresponding Canvas dropbox — you'll find one dropbox per problem. You'll need to follow the instructions listed here, including file naming and formats, or you will receive no credit and we will not be reconsidering this decision. These instructions don't take much effort to follow, but save us an enormous amount of time in grading, which we're neither willing nor able to spend, so we're giving you the tools to do this right automatically, but ultimately placing the onus on you to get it right.


Where do I submit these?

Submit your work to Canvas, just like your projects. Each exercise set will describe in more detail what its deliverables are, just like the projects, but you'll have to read all the way to the end of the write-up to see it! Part of getting credit for these involves organizing and submitting them correctly.


Will the late policy apply to these?

No. The objective of these exercises is to keep you up-to-date on what we've been doing in class, so you don't find yourself midway through the quarter having fallen deeply behind. There's a lot of value — for you — in being sure that you've done them on time, so we're requiring them to be done and submitted on time.

At the end of the quarter, your lowest total reinforcement exercise score for any given week (including any week in which you submitted none of them) will be replaced with the median total score of the others (including only those you actually submitted) in any other week, which means that you can indeed skip one of them (or struggle on one of them) without impact. For example, suppose that these are your scores at the end of the quarter:

The lowest score is on Set 3. There are seven other submissions, the median score of which is 8 — because, among the submitted weeks other than Set 3, there are three higher scores than that and three lower scores than that. So, when performing the final grade calculation, Set 3's score will be adjusted to 8 accordingly. (Note that you will not see this adjustment on Canvas.)

Beyond that, since each one has a relatively small value (3% of your grade), there's not a dramatic impact if you fail to submit another of them, or if you submit one of them that's only partially done.


The exercise sets

Set Exercises
Set 1 Exercises
Set 2 Exercises
Set 3 Exercises
Set 4 Exercises
Set 5 Exercises
Set 6 Exercises
Set 7 Exercises
Set 8 Exercises