Written Midterm

The multiple choice midterm, which covers quizzes 4 - 8 (chapters 6 - 10), will be available in the testing center starting Monday, October 31st, and will close on Saturday, November 5th (the last test handed out on Saturday is at 3:00 PM). There is no late fee for taking it on November 5th. This is closed book and closed note. It will probably take you about twice as long as it took to do the first Multiple Choice midterm because there are twice as many questions. Note that we will again plan on only making 130 copies of the midterm, so you can't all take it on Saturday. Plan ahead. For more information on Testing Center Hours see http://testing.byu.edu/info/center_hours.php. There are 38 questions and they are very, very similar (wink, wink) to the questions from the quizzes.

Programming Midterm

For the second programming midterm we will have a timed programming exam (3 hours). We know that this will initially cause a great deal of anxiety for some of you, but stay calm! We are doing a number of things differently to ensure that you will be successful. Please read this entire page for further details.

The programming midterm will start Tuesday, November 1st at 12:30 PM and ends Saturday, November 5th. The procedure will be as follows:

  1. You need to go to 1119 TMCB and sign up for a 3-hour slot in which to take the exam. Sign-up sheets are posted. If you will be using your own laptop, please sign-up in one of the spaces marked “Laptop”. Take note of the date, the time, and the location of the exam session that you sign up for. Please try to find a slot that will work with your schedule. If there is absolutely no way, please email me ASAP with a 3-hour block (between Tuesday, November 1st, and Saturday, November 5th) in which you are available to take the midterm.
  2. You will go to the lab indicated on the sign-up sheet on the day and time that you sign up for and receive the exam specification and pass-off form. Plan to be there 5 minutes early so we can stay on schedule.
  3. You must email your code (to cs142ta.codesubmission@gmail.com) and hand back your pass-off sheet in person in 1119 TMCB within 3 hours from when you first receive the pass-off form.

About the Exam

The exam is modeled very closely after the Teams lab. It is not the same problem, but if you master the concepts in Teams lab, you will be perfectly prepared for the midterm exam and will likely be able to finish in well under 3 hours (we anticipate many will finish in under an hour). It is open book, open notes, and open internet. You may look at old source code.

The exam is designed so that you can quickly and easily earn partial credit. Just like the Teams lab, the pass-off requirements are set up in a linear fashion to guide you through solving the problem (see https://facwiki.cs.byu.edu/cs142fa11/index.php/Teams#Pass-off_procedure). For each step you complete, you will earn more points until the program is complete. This way not only do you feel better because you can see your score going up, but you also have a guide to where to go next at each stage of implementation. The requirements are very similar to the Teams lab requirements.

Because the Teams lab is crucial to your midterm preparation, we will be holding numerous help sessions both before, during, and after the Teams lab is due to go over the concepts in the Teams lab. Once the midterm starts (Tuesday, November 1st, at 12:30 PM) the TAs will no longer be able to discuss or give help on the Teams lab, so take the chance early to make sure you understand the lab. Here are a list of concepts that you will need on the midterm programming exam:

  • Prompting the user for input and get user input at the commandline
  • Reading in the contents of a file
  • Writing a class
  • Being able to define functions and data members for a class
  • Using “new” to allocate memory for objects
  • Using vectors to store objects
  • Find the max of a set of values
  • Find the average of a set of values
  • Writing good test cases
  • Proper Formatting
  • Knowing how to debug your code

You will NOT need to do anything with string manipulation or character arrays.

Lastly, let me give you some encouragement. Our purpose here is not to intimidate you with a 3-hour time limit, but rather to provide you an experience to boost your confidence that you can succeed in a real-world programming scenario. We believe that you are fully capable of succeeding on this midterm. Our goal is to prepare you well before the midterm so that when you go in to take the midterm you will be confident that you can write the specified program in a 3-hour block of time. Practice, practice, practice ahead of time with the list of concepts given above. Ask questions and prepare well and “ye shall not fear”!

A prime frustration for students with programming assignments is that they think that when it comes to earning points, it's all or nothing: either the program works and you get all the points, or the program doesn't work and you get no points. This is not true and we have taken painstaking effort to set up the point breakdown so that you can start with an empty, functioning program and get points for each element of functionality that you add in to the program until you have it fully functioning and all the points. This is called incremental programming. An excellent article on this subject is found here http://johndirk.articlealley.com/incremental-programming-8557.html. You don't necessarily need to use functions as the author does (although it would be highly recommendable); incremental programming refers more to the idea of starting with something simple and functioning and then adding functionality a little at a time. “Incremental approach is more reliable, safe and easy to follow. For students and beginners this would be an ideal way to approach their programming problems with confidence.”

Is there a more idealized solution of the Teams lab that I can study from?

If you feel like your code is a “very Frankenstein-ish collection of code” (to quote a student), it may be beneficial to see how someone else solved the problem. For a number of reasons, we feel it detrimental to post an “ideal” solution because it is important to understand that there is no such thing as an “ideal” solution. If the program works, then it is a viable solution. If, however, you feel like your solution is unclear, or too difficult to reasonably follow, here are a few suggestions to help in this case:

  • Attend one of the help sessions and see how others and/or a TA approached the problem.
  • Ask other students how they solved a particular problem.
  • Consider showing your code to a TA or to a student tutor and get some feedback.
  • Look at the Computers Example. My (Paul's) approach to the Teams lab (and to the midterm) is very much like my approach to the Computers example. I essentially break down my program into the following steps:
  1. Ask the user for a filename
  2. Read in the filename
  3. Open the file (it's critical you make sure you're able to open the file and read correctly from it before you do anything else)
  4. Read in the contents of the file line by line. For each line in the file I create or modify my Team objects, updating values in my objects using mutator functions (this requires creating a class)
  5. After the whole file is read in and I have my vector of objects, then I take each requirement question, one by one, and figure out how to use my list of Team objects to answer that question. Considering that I am no longer changing my objects, but only looking at and comparing the data in my objects, this is where I primarily use my accessor functions. Only after I answer the first question and print it to the screen do I even think about the second question.

In doing this approach, I use incremental programming. I add one line of code at a time, and then I compile/run my code to make sure that new added line of code works. For example, before I even try to create a class or create an object from that class, I make sure that I'm reading in the data from my file okay. Use print statements to make sure that you're program is working the way you expect it to work.

Also in the Computers Example, note how my test case file has different test case categories represented.

cs-142/midterm-2.txt · Last modified: 2015/01/07 09:10 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0