Final Exam

Answers

Scores and Graded Exams

How do I find out my score? The scores have been released on Gradescope, a website for grading course materials. If you are unable to access Gradescope, please email the Head TA. Log in to Gradescope to see your exam score.

If you have questions about exactly what points you missed and why, please look over the grade and markings made by the grader and compare it with our answer key and test project. If you still have questions, please feel free to stop by the instructor's office hours at the beginning of Winter Quarter.

The statistics of the exam scores (rounded to the nearest whole number, out of 180) were as follows:

Mean: 142

Median: 153

Here is a histogram of the exam scores (out of 180):

Regrade Policy

We work hard to grade consistently and correctly, but sometimes we make mistakes in grading. If you believe part of your exam was incorrectly graded, please first download the Qt Creator project linked to above and run your answer. This is the easiest way to test your code. If, after running your code, you still believe your grade is incorrect, submit a regrade request online via Gradescope (first view the question in your exam, and submit a regrade for that question on that page). Regrade requests need to point out the aspect of the problem that was correct, but for which points were taken off. We use a detailed rubric to grade exams, so simply requesting that an incorrect answer "should be worth more points" is not likely to result in additional points. You must also submit Qt unit test output for the given problem (if applicable), and a copy of your code (if needed, with any minor syntax errors corrected), and any other necessary code/content so that we can run and evaluate your code.

You must provide all the required information listed above and in the regrade request form in order for us to review your regrade request. Also, we reserve the right to re-grade the whole exam to make sure there are no other grading issues present - this may result in a lower total score.

All regrade requests must be submitted by the end of the first week of Winter quarter - by 11:59PM on Sunday, January 13, 2019.

For a variety of reasons (including university policy), there will be no alternate time for the final exam (other than for OAE accommodations). Please make sure that you can attend the final exam on Monday, December 10, 8:30-11:30AM PST.

If you have academic accommodations, e.g. through OAE, please let us know by Wednesday. 12/5 @5PM PST if possible.

If you do not have a workable laptop for the exam, you must let us know by Wednesday 12/5 @ 5PM. Limited charging outlets will be available during the exam.

Downloads

Note: the practice BlueBook exam is configured with an infinite time limit. You cannot close BlueBook and come back to work on the exam later - you must complete it in one sitting. You cannot submit practice exams - if you'd like to check your answers, leave BlueBook open while you do so. Note that for security reasons, BlueBook disables copy/pasting into or out of BlueBook.

BlueBook

Based on a handout by Brahm Capoor

BlueBook is a program that can administer electronic exams distributed in a special file format.

We provide versions of BlueBook for both macOS and Windows operating systems. If you have a laptop that does not have one of these operating systems or you are unable to install applications on your laptop for any reason (for instance, it is a work or borrowed laptop), please contact the instructor.

Once you have downloaded the installer file, install BlueBook wherever you wish on your computer. If you're using a Mac and you get an error saying that the Disk Image is from an unidentified developer, open up the installer file in your finder, and right click it and select "Open."" The same window will pop up, but this time you'll have a chance to open it anyway. On Windows, if you get a message that says, "Windows protected your PC," you can click on "More info" and then "Run anyway."

BlueBook itself does not come with any exams but is rather just an application used to take exams. Your exams, including practice exams, will be distributed as .json files which your course staff will upload to the course website. These exam files are encrypted and cannot be opened without a password, which will be provided to you at the start of the exam. Download these .json files and keep them wherever you wish on your computer. The practice exam materials have also been provided in this format, so you can get familiar with the process.

Once you have BlueBook installed and an exam downloaded, begin by opening BlueBook. On a Mac, if you get a message saying that you were blocked from opening the app for security reasons, browse to the app in the Finder, right click it and select "Open."" The same window will pop up, but this time you'll have a chance to open it anyway. The app should go full screen and allow you to choose the exam file you downloaded earlier. Click the folder icon on the right of the screen and navigate to the .json file and click ‘ok’, followed by ‘Load Exam’. At this point, you’ll be brought to the Exam Start Screen. Fill out your details on this screen, fill in the password and click ‘Start Exam’.

You’ll then be brought to the main Exam View, which allows you to go back and forth between all the questions for the duration of the exam. You can navigate between questions using the toolbar at the top of the window. The text editor provided to you will have syntax highlighting, bracket completion and automatic indenting, but will not allow you to compile your code. The exam will end automatically after the specified duration ends.

We know that BlueBook is not the same as working with a compiler as you do in Qt Creator, and we account for that in how we design and grade the exam. We are assessing your ability to think logically and use appropriate problem-solving techniques. We expect you to express yourself in reasonably correct C++, but we will be lenient with errors that are syntactic rather than conceptual.

When you are done with your exam – or time has run out – you can begin the submission process for the exam. Do so by clicking the blue ‘Submit’ button in the toolbar. Once time runs out, this process automatically starts. Beginning submission is an irreversible decision, so make sure that you’re confident you’re ready to turn your answers in. Once you confirm that you want to submit, the BlueBook window will shrink and allow you to turn on your internet in order to submit the exam. Importantly, we verify your identity while submitting, so please make sure to have your two-step authentication device with you. Once your submission is successful, you will see a message with a green check mark and a confirmation code of your exam submission, which you should keep for your records in case any issues arise later. At this point, feel free to close BlueBook. Congratulations! You’re done with the exam!

Some final notes about BlueBook:

Please make sure that your laptop has at least a few gigabytes of free space before the exam begins. While BlueBook exams certainly don’t take up that much space, we do back up your answers in case your computer crashes and we want to make sure your computer has enough space for these backups.

Please come to the exam with a fully charged laptop. While there will be some facilities to charge your laptops during the exam, there will likely not be enough for everyone.

BlueBook is capable of detecting if you switch away from the window during the examination. In order to avoid this signal being triggered accidentally, please disable your internet connection and/or notifications before the exam begins. You will have the opportunity to turn them back on when the time comes to submit.

Should your laptop crash during the exam, please see a proctor as soon as possible so they can restore your answers and you can continue working. Do not attempt to restart the exam from scratch as this might overwrite your previous answers.

Logistics

The Honor Code: the exam is to be completed individually and without any assistance from a partner or other students. Follow the Stanford Honor Code (see handout in the Handouts dropdown) during the exam: submit only your own work, do not use unpermitted aids on the exam (see below for permitted aids), and say something to the instructors or students in question to prevent any inappropriate activity conducted by others surrounding the exam.

Permitted Materials: During the exam, you may use/reference:

Programming Abstractions in C++ textbook.

A syntax reference sheet, provided during the exam

You can bring any editions of the textbook, but not a digital copy and not a printout of the book on loose paper. There may be 1 or 2 "loaner" books available at the front of the room, but you will have limited access to these.

You are not permitted to use any other materials, such as printouts (notes, slides, code, practice exams, etc.), other textbooks, or electronic devices (iPads, Kindles, calculators, music players, etc.).

Grading: Unless a question specifically mentions otherwise, the code you write will be graded purely on functionality (proper behavior and output) and not on style. For instance, redundancy, variable names, commenting and decomposition will not impact your score. However, we still encourage you to use good style in your code as oftentimes they are easier to write out (and modify if needed).

Note that certain problems may have certain constraints (such as only using certain material, etc.) that you must follow to earn full credit. We reserve the right to deduct points for extremely inelegant or inefficient code that dodges the spirit of the problem.

You are not required to write #include statements on the exam. Please do not abbreviate any code on the exam (such as writing "x2" next to code to copy it twice). Abbreviated code will not be graded.

Pseudo-code (writing English sentences and phrases instead of code) will typically earn little to no points. For example, writing "In this part of the code, I want to open the file and read each line and print it" will not earn any points.

The exam will be administered via BlueBook software, which is a full-screen program that displays a problem on the left, and a text editor for your solution on the right. The program provides basic syntax highlighting (e.g. highlighting variable types, keywords like "return", etc.) but it does not support compiling/running code or displaying any syntax or compile errors. You may include your answer, as well as any scratchwork, in the text area for each problem. An answer to a problem not in the designated answer pages for that problem will not receive any credit.

If you know of a method/class in the textbook that would help (for example, from an included sample problem or from sample code - this does not pertain to code in the Stanford Libraries such as getWidth(), setColor, etc.), you can simply cite what section/chapter it is from and use it. You do not need to rewrite it.

Unless otherwise specified, it is fine to write helper functions to implement the required behavior.

What to Bring

The exam is on your computer. You should bring:

Your laptop and charger

The device you use for two-step authentication

Course textbook

A power strip/extension cord (optional, but recommended if you have access to one)

Material Covered

The exam will cover all material from this quarter, excluding the 12/5 lecture on the C++ standard libraries. This includes the following concepts listed below. Note that you may be asked to read code (look at a piece of existing code and answer questions about it, such as writing its output) and/or write code (write a piece of code such as a method or short program that solves a given problem), or answer short written questions. If you have any questions about what material is covered on the exam, feel free to ask or post on Piazza.

Arrays: read/write code that use arrays on the stack or heap, such as the ArrayStack example from lecture.

Trees: understand/implement operations on a tree (e.g. BST or trie) such as adding elements or performing traversals, and understand qualities of trees such as balance.

Graphs: look at a given graph and answer questions about it, such as connectedness, cyclicness, degrees; understand the execution of graph algorithms such as DFS, BFS, Dijkstra's algorithm, A*, and topological sort; read/write programs that manipulate graphs.

Inheritance, Polymorphism, Composition, Object-Oriented Programming: look at a piece of code involving inheritance and interpret its output; and/or, write a class that uses inheritance or composition to extend existing behavior.

Hashing: understand the technique of hashing, and how it is applied to data structures such as a HashSet.

Assignments: be familiar with data structures, algorithms, or programs you implemented as part of the class assignments.

any material that is only covered in the "Overflow" slides at the end of various lecture slide decks

material from Wednesday 12/5's lecture on the C++ standard libraries

Exam Strategies

Hopefully you have been keeping up in lecture and doing well on the assignments, and have an idea of what the exam may be like after taking the midterm. The practice final will give an idea of what to expect, but we also want to provide some general advice for how to prepare and approach the exam.

The Rationale Behind Computer Exams

You will be taking your exam using software called BlueBook. Electronic exams hold several advantages. For students, writing code on a computer (with syntax highlighting, undo, cut, etc) is a much easier exam experience than writing solutions out by hand. The way in which you are assessed is much closer to the way in which you program. The logistics become much easier for students with disability accommodations. On our end, it makes it a lot easier to make, distribute and grade exams. Instead of using large amounts of paper to to print exam exam, we use 0. Finally, grading handwritten exams is hard and inaccurate. Handwritten exams allow for bias in grading [1] and are inaccurate because we can’t run your programs. Your midterm will still be assessed by a human, but they will be better equipped to understand what you were trying to do.

Great, it’s on a computer! Why can’t I run my program? In a time-restricted situation, immediate feedback from the compiler can be more of an impediment than an advantage. Imagine this: you read the first problem, have a good idea of how to solve it, write your solution, and trace its operation and feel good. You compile and test it. Suppose it exhibits a bug—even though it may only be a minor issue, you can see your answer is wrong—so you hunker down and rework and retest until perfect... even if it takes the whole exam. Bad deal – since you never got to the other problems on the exam! We want you to write your best answer and move on.

How to Prepare for the Exam

"Open textbook" doesn't mean "don't study". The exam is open-textbook; bring along the course textbook. We don’t expect you to memorize minute details and the exam will not focus on them. However, this doesn’t mean you shouldn’t prepare. There certainly isn’t enough time during the exam to learn the material. To do well, you must be experienced at working through problems efficiently and accurately, and using relevant programming patterns, without needing to repeatedly refer to your resources.

Practice, practice, practice. A good way to study for the programming problems is to take a problem (lecture or section example, chapter exercise, sample exam problem, CodeStepByStep problem) and write out your solution under test-like conditions (e.g., in a text editor without compiling, not in Qt Creator, with a short amount of time). Don't fall into the trap of just practicing your exam problems in Qt Creator. The computer compiles your code and provides immediate feedback that you won't have on the real exam. You want to practice under real exam conditions to become comfortable writing code in a timed setting. This is much more valuable than simply reviewing the practice materials, looking at the answers, and making sure you understand why they are correct - a much different task than having to write the solutions yourself.

Get your questions answered. If there is a concept you’re a bit fuzzy on, or you’d like to check your answer to something, or you wonder why a solution is written a particular way, swing by the LaIR/CLaIR, come to office hours, find Nick before/after any lecture, or post on Piazza; we are happy to help.

How to Take the Exam

Scan the entire exam first. Quickly peruse all questions before starting on any one. This allows you to “multitask” — while working on one problem, your mind can be brainstorming strategies or ideas for another problem in the background. You can also sketch out how to allocate your time between questions in the first pass. Speaking of which...

Spend your time wisely. Don’t get stuck on any particular problem. There is much opportunity for partial credit, so it’s better to make good efforts on all problems than to perfect an answer to one, leaving others untouched.

Consider the point value of each question. Divide the total minutes by the total number of points to figure the time per point and use that as guide when allocating your time across the problems. You may want to reserve a little time for checking your work at the end as well.

Leverage the materials you bring with you. If you know of a method/class in the textbook that would help (for example, from an included sample problem or from sample code - this does not pertain to code in the Stanford Libraries such as getWidth(), setColor, etc.), you can simply cite what section/chapter it is from and use it. You do not need to rewrite it.

Style and decomposition are secondary to correctness. Unlike for the assignments, for an exam, unless a question explicitly says otherwise, your responses will only be graded on functionality. Decomposition and style are thus somewhat de-emphasized. However, good design may make it easier for you to get the functionality correct and require less code, which takes less time and has fewer opportunities for errors. Moreover, when a solution is incorrect, good stylistic practices such as commenting may help us determine what you were trying to do and award partial credit.

Answer in pseudo-code, but only if you must. If the syntax of C++ is somehow in your way, you can answer in pseudo-code ("code-like English"). In occasional cases, this may result in a small amount of partial credit. There is a wide variation in the scoring for pseudo-code. Some pseudo-code is vague and content-less and does little more than restate the problem description, and thus is not worth any points. The more details it provides, the better. But truthfully, very good pseudo-code contains so much information that it typically would have been easier and more concise to just write in C++ in the first place.

Pay attention to specific instructions. A problem statement may include detailed constraints and hints. You may want to underline or highlight these instructions to be sure you don’t overlook them. These constraints are not there to make things more difficult; typically we are trying to guide you in the direction of a straightforward and simple solution. If you disregard these instructions, you are likely to lose points, either for not meeting the problem specification or for errors introduced when attempting a more difficult alternative.

Syntax is not that important if it is clear what you mean. We won't trouble you about most small syntax errors (forgetting semi-colons, misspellings, etc.) as long as your intentions are clear. Having said that, if your syntax errors cause ambiguity, we might not get the correct meaning. For example, if we see a for statement followed by two lines, where both lines are vaguely indented or a third line has been added in after the fact, but you forgot curly braces, we may be confused. If there are braces around all the lines, it will be clear you intended both to be a part of the loop body, but without the braces, we can’t be sure and it may make your answer incorrect.

Comment out abandoned attempts rather than erasing them. As it usually turns out on a CS exam, you will have false starts on a problem — you try one strategy and hit a dead end. You try something else and then realize you actually were closer to the right solution the first time. If you haven’t erased your first attempt, you can always go back to it. Once you work out a better answer, comment out your earlier attempt. When you comment out work, please direct us to where you have written the solution you want graded instead. If you forget to comment out your bad attempt and hence appear to have two answers, we reserve the right to pick which one to grade.

Save a little time for checking your work. Before handing in your exam, reserve a few minutes to go back over your work. Check for missing initialization/return statements, correct parameters passed to functions, etc. We try not to deduct points for minor things if it is obvious what you meant, but sometimes it is difficult to decipher your true intention. You might save yourself a few lost points by tidying up the details at the end.

Download the exam ahead of time. The exam file that you open in BlueBook will be posted on the course website in advance of the exam; we will also send out an email when it is available. Download the encrypted exam before you come to the exam so that you are ready to go when the test starts. We will provide a password when the test starts that unlocks the exam.

Prepare your laptop. We will have limited outlets available for those who absolutely need them. Come with a laptop that has enough battery for the full exam. If you need battery it would be useful for you to bring your own power strip. Make sure your computer isn’t just about to run out of memory.

Final Thoughts

Always remember why you are at school. Learning and education tend to be a more fulfilling goal than just high grades. If you work hard, study lots and feel good about your understanding of computer science, that is an achievement to be proud of in itself — regardless of how many points you get relative to the other students in the class. Remember that computer science is not an easy endeavor, even for experienced computer scientists.