Frequently Asked Questions about Project 1

 Part B:

1. What is the order of the elements in the result of m_union and m_intersection?

The order is not important. A multiset by defintion contains elements in any order. But each element appears only once, with the appropriate counter. For example '((a . 2) (b . 2) (a .1)) is not a valid multiset, it should be '((a . 3) (b . 2)) or ((b . 2) (a . 3)). Note: for the m_union example in the handout, you don't necessarily have to obtain  that particular order in the result. You should try to implement the most efficient algorithm.

2. Do we need spaces in a dotted pair '(a . 2)?

Yes. Because there are numbers and symbols containing dot (1.23, 'a.b).

Part A:

1. What does the sentence "Do not use the define statement anywhere else in your program" mean?

Sorry for the ambiguous sentence. What I mean is that you have to use the two global variables STUDENT and COURSES in your program, but you are not allowed to define other global variables. Of course you can use define to define functions.
 

2. Is there a typo in "Your program should be able to tun on any database using the same representation." ?

Yes, the word "run" was mistyped "tun" . The sentence should be:  "Your program should be able to run on any database using the same representation."

What this means is that your functions should recurse through the lists STUDENTS or COURSES to get answers to questions. For example, if I ask what are the names of all students, it is not ok if you notice that there are five names in the list (database) STUDENTS and you build a list with those five. When we do marking we will test your program on different data (a different STUDENTS and COURSES list).
 

3. Is the starter code part of the file "p1.scm" ?

Yes.
 

4. When you do testing, do you have to test with different values for STUDENTS and COURSES?

No. A thorough testing would include this, but I didn't ask you to do it (because of time constraints). You have to test only the functions you implement, while keeping STUDENTS and COURSES fixed.