COS 126 Midterm Exam Information, Spring 2008



Q+A.

There will be a Q+A Tuesday night, March 11, 8:30-10:00pm, Room Friend 101

The precept before the exam will have a substantial amount of time for Q+A and review.


Rules: Written exam.

Rules: Programming exam.


Material covered.

The first part of the exam (in lecture) covers all of the above. It will be multiple-choice or short answer questions on the important material. The best way to prepare for this part of the exam is to read the book and to study the lecture notes, including the Challenge questions that appeared in lecture. You are not responsible for knowing details of complicated applications examples like the random web surfer or IFS.

The second part of the exam in precept is strictly about programming. You will be asked to write a program from scratch (a mini programming assignment). Given the time limitation, this program will not be conceptually difficult, just a test of your ability to write a program that solves a simple problem. The best way to prepare for this part of the exam is to work a few of the easy exercises in the book and on the booksite that call for writing small programs.


List of topics.

This list is a sumary of the main topics on the exam, for your use as a checklist when studying. Do you understand the basic ideas behind each of these topics? If so, fine; if not, reread the appropriate sections in the book and lecture slides.


APIs.

You should be familiar with the following static methods (the ones we've encountered frequently in the lectures and assignments). If we want you to use some other library function, we'll remind you how it works.
Math.sqrt()
Math.abs()
Math.sin()
Math.cos()
Math.exp()
Math.log()
Math.random()
Math.E
Math.PI

System.out.println()
System.out.print()

Integer.parseInt()
Double.parseDouble()

StdIn.readInt()
StdIn.readDouble()
StdIn.readString()
StdIn.isEmpty()

StdDraw.line()
StdDraw.point()
StdDraw.circle()
StdDraw.setXscale()
StdDraw.setYscale()
StdDraw.clear()
StdDraw.show()
StdDraw.picture() 
StdDraw.filledPolygon()


Old Exams.

A good way to practice for the midterm is to solve problems from old exams.

Warning 1: Some old exams include questions on topics that we have not covered this semester, for example circuits, TOY architecture, and percolation.

Warning 2: Studying questions that ask you to write code is worthwhile, but bear in mind that old exams were two hours, closed book, no computers. This year, the written exam will not have questions that ask you to write a significant amount of code and the purpose of the programming exam is to test your ability to write code. Also, the time allotment for the written exam is half as long, so there will not be as many questions this year as in the past.