Homework #13

Due November 8, 2005

 

First:  here is a link to one form of the exam...

You should go over it and look up the answers that you did not know or were not sure of. 

You should also verify those you thought you know.

 

Second:  IF you did not demo your Alice program in class because yours was identical to one shown, then you need to create a new one to demo on Tuesday.  Try to use your imagination and the capabilities of the environment.  Use the control structures and the event handling if you can.  Make it fun to watch.

 

Third:   Read section 2.4 Functional Programming: LISP  in your textbook.   pages 52-57.

 

Fourth:  Download  xlisp-plus from  http://users.cs.jmu.edu/adamses/public    xlispsml.exe

 

Fifth:  Write  Lisp functions (defuns) to achieve the following: 

  1. Define a LISP predicate function that takes two lists as arguments and returns T if the two lists are equal and nil otherwise. 
  2. Write a LISP predicate function that takes a list as an argument and returns the number of top level items in the list.  Note that you MUST use cond not if and that this function is recursive which means it has a base case or stopping case.

             Note:  there are lots of materials on the webpage to help you with Lisp.  See November 1 lecture notes.

             DELIVERABLES:  A printout of your code with a screen capture of several tests of the code attached.  Remember that

                                         your code needs the standard heading, and descriptions and comments.

 

NOTE:  There will be an ”expert” related assignment due on Thursday, November 10th.  I will add it here sometime over the weekend in case you want to get a head start.