From leavens@larch.cs.iastate.edu Tue May 2 18:00:09 2006 Date: Tue, 2 May 2006 18:00:09 -0500 (CDT) From: Gary T. Leavens To: gqiu@cs.iastate.edu Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: quick exam question Hi Grace, On Tue, 2 May 2006 gqiu@cs.iastate.edu wrote: > Hi Dr. Leavens, > > Quick question: how many questions will be on the exam? I noticed the spring 05 > one only had 5 questions while the spring 04 one had 8 questions. Which one > should we expect our exam to be in both terms of content and length? I'm not sure, but it will probably be longer than Spring 05. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------ From leavens@larch.cs.iastate.edu Tue May 2 18:05:15 2006 Date: Tue, 2 May 2006 18:05:15 -0500 (CDT) From: Gary T. Leavens To: gqiu@cs.iastate.edu Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: quick exam question Hi Grace, On Tue, 2 May 2006 gqiu@cs.iastate.edu wrote: > How important is it that we thoroughly know the object-oriented programming > languages section? It seems we only went over that for a day before moving onto > the review. However there's 2 pages worth of review information on the study > guide for it... The OO part won't be important, as we only spent one lecture and no homeworks on it. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------ From leavens@larch.cs.iastate.edu Wed May 3 20:50:51 2006 Date: Wed, 3 May 2006 20:50:51 -0500 (CDT) From: Gary T. Leavens To: Nick Retzl Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: CS 342 Final Exam Hi Nick, On Wed, 3 May 2006, Nick Retzl wrote: > Would you be able to tell me or give me advice on how to do problem 8 on > the exam 4 of Spring 2004? I've been reading it for a little while now and not > even sure really how to start it. Any help would be appreciated. Thanks! Ah, for that problem, you want to use a recursive helping procedure that takes the value (or type) of the tested-exp, the list of typeexps (types), and the list of bodies. This is essentially a list recursion: in the empty case, you return what the problem says (number->expressed 0), and in the non-empty case, you compare the value of the tested-exp (or its type) against the car of the types list, if it matches, then return the value of the car of the bodies list, otherwise recurse. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ---------------------------- From leavens@larch.cs.iastate.edu Wed May 3 20:52:02 2006 Date: Wed, 3 May 2006 20:52:02 -0500 (CDT) From: Gary T. Leavens To: rmatus@cs.iastate.edu Cc: Com S 342 TAs -- Kewei Tu , Ru He Subject: Re: Old Test question.... 342... Hi Rich, On Wed, 3 May 2006 rmatus@cs.iastate.edu wrote: > http://www.cs.iastate.edu/~cs342/old-exams/Spring04/exam4.pdf > Problem #5.... the isProcedure primitive.... > > would you just do a procval->expressed? on the first args thing, and if it > returns true, you return true? I'm kinda hazy on how far you have to go on > it. Yes, that's right, as long as by "return true" you mean to return (number->expressed 1). Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------