Homework #1 FAQ
Problem #1
Question:
How should I approch problem number 1?
Answer:
It is intended that you would treat the various kinds of statements as
subclasses. Each has its own special components, and a clean design will
not ignore that fact. It may have been suggested to some of you that one
entity set "Statement" with NULL's in attributes that are not applicable
would make sense. It is not horrible, but it misses a lot of the
structure that is present in the problem and would not be a "full credit"
solution as far as we are concerned.
Question:
How do I represent whether a variable is on the left or right of an assignemnt?
How complex can the right sides of assignments be?
How do I represent the order of identifiers in an assignment and/or
how do I represent the order of statements in a block?
Answer:
None of these issues are requested in the problem statement.
You only need to tell what identifiers are mentioned in an assignment, not
where they are.
You do not need to represent the order of statements in a block
(perhaps we should have asked for that, but we didn't).
Problem #2
Question:
In part b, what do you mean by "justify your answer"?
Answer:
You need to give an explanation for your answer in the form of an informal
proof. If you are trying to say "yes", then write a couple sentences
explaining why (need not be formal, but should be complete enough so that
we know you really understand). If you are trying to say "no", then a
counter-example will be fine. Unless otherwise stated, this will generally
be what we mean whenever we say "justify your answer" in this class.
Problem #3
Question:
Why isn't the country-area code relationship many-many?
Answer:
We've also received a number of questions about HW1, Q3, that suggest
the entity set "Area Code" is nothing more than a number, like 650.
That point of view loses a lot. Abstractly, an area code is something
like "the area code around Stanford." One attribute of that area code
is its number, 650, but that number is not the same as the area code
entity for the Stanford area. I'll let you figure out how to approach this
problem, but please don't think, for example, that the relationship
between countries and area codes is many-many. There may be many
area codes numbered 650 in different countries, but the area code around
Stanford is in only one country (USA).
Last modified: Sun Oct 10 15:50:38 PDT 1999