You will be allowed to make up some of the points lost on the exam by carefully following the instructions on this page. You can recover points for 3 problems:

You can see how many points you scored on each of these problems by looking at the comment in blackboard. If you would like to see your exam, you should come to Prof. Wood’s office hours or schedule an appointment to meet him 1 on 1.

To Submit: Fill out this form when you are done so we know you are ready to be graded: https://goo.gl/forms/fv6e1zyfNpMesEQ93
You will not be able to make further changes to your repo after you submit!

Before you can get any points back, you must answer this survey about your study habits. If you did poorly on the exam, you should pay special attention to the question asking about how you will change your study habits. I suggest you schedule specific times in your week where you will focus on this class, and add them to your calendar with a reminder/alarm. Keep in mind that the out-of-class time commitment for a 4 credit course is a minimum of 6-7 hours per week at GW.

Then, create a repository using this link for all aspects of the assignment.

Deadline: You must submit all work by Monday November 19, 11:59PM. You must commit files to your repo and submit this form when your submission is ready. Late passes may NOT be used for this.

Alternatively: If you do not want (or need) to redo any of the problems, you can simply fill out the survey linked above to receive 2 bonus points on the exam. (This bonus will not apply if you later choose to redo any problems)

Memory Diagram

We have gone over quite a few memory diagram problems in lecture and for the exam review. Be sure you understand these key points:

  • How to trace through a program and execute it in your head line by line
  • When and where data gets added to or removed from the stack - See the Stack Model in Module 2
  • When and where data gets added to or removed from the heap - See the Heap Model in Module 1
  • Study the examples we have covered, including Review 2.1 (Solution PDF or Video)

For this problem you can recover points to achieve up to 17 out of 25. To get these points you must:

Create your own memory diagram problem and sample solution. This should be similar to the style of the problem in the midterm review but with different functions and variables.

  • Your problem should require the student solving it to understand:
    • how stack frames get added/removed when entering/leaving functions
    • the order that variables get added to the stack
    • adding/removing data to the heap with malloc
  • If you want, you can test other knowledge as well such as loops, pointer arithmetic, arrays, buffer overflows, etc.
  • Try not to make your problem too tedious - the student solving it shouldn’t have to laboriously repeat lots of functions
  • Create your file using either the Word or Pages template in the memory/ directory. Name your blank version memory and your solved version memory-solved.
  • In your solved version, write a few sentences explaining anything special in your program that makes it more interesting
  • For simplicity, you may want to restrict your data types to all be the same size – if not, you should be sure to explain in your problem instructions the size of variables and whether they need to do something special to show them in memory (e.g., my problem has memory rows corresponding to 4 bytes, so all the variables are sized 4 bytes)

To get full credit in recovering your points, your problem should be high quality enough that I can use it as a homework, exam, or review question for future versions of this class! If your problem is especially good/interesting, I might award you a bonus point.

Linked List

Linked Lists were covered extensively in C Modules 3 and 4. Be sure you understand these key points:

For this problem you can recover points to achieve up to 15 out of 20. To get these points you must:

Create your own code/memory diagram problem and sample solution about data structures. This should be similar to the style of the problem in C-4 slide 21 but with different a data structure.

  • Your problem should require the student solving it to understand:
    • how to lay a struct out in memory
    • how to work with pointers
    • how to interpret a visual or text description of a data structure and turn it into both code and a memory layout
  • You can have your problem cover more advanced topics, but it should not involve multiple function calls (unless you have a really good reason).
  • You can use any data structure you like, but it cannot be identical to the Linked List example in the slide. Consider doing something completely different like a tree or hash table!
  • Create your file using either the Word or Pages template in the struct/ directory. Name your blank version struct and your solved version struct-solved.
  • Be sure your instructions clearly explain what data structure the student needs to create. In my problem I do this with an illustration of the linked list, but alternatively you could describe this in words (as long as it is clear).
  • In your solved version, write a few sentences explaining anything special in your program that makes it more interesting.

To get full credit in recovering your points, your problem should be high quality enough that I can use it as a homework, exam, or review question for future versions of this class! If your problem is especially good/interesting, I might award you a bonus point.

Programming

To complete this problem you must solve this programming exercise that was given as a homework in a previous year. Be aware that this is substantially harder than the problem on the exam, and it is likely to take you multiple hours to solve (students had 1.5 weeks previously). You should not allow solving this problem to interfere with your regular progress in this class!

Important: Solving this problem still counts as if it was part of your exam, thus if you get help from another person that counts as cheating on your exam. You may not talk with anyone other than the instructor, TAs, or LAs about this problem. Violating this rule will be treated just as harshly as if you had copied from another student during the exam - you will get a 0 on the entire exam!

Nevertheless, this exercise is challenging and will require you to learn new things not covered in the class (working with strings and reading from files). You can search the internet for resources about these general problems. If you have specific questions about the exercise or need help, you should arrange to meet with the professor! It is very likely you will need to come to office hours at least once to get help to solve this problem.

Your code should be put in the programming/ folder of your repository.

To get full credit and recover 17 out of 25 points, your solution should receive full marks as dictated by the grading rubric on the assignment page.