- Thursday 10 October: Test cases and marks for Assignment 0
-
The test cases we used to evaluate your assignment 0 programs
are available through the "Assignments" page, or by clicking
here.
The average and distribution of grades is also availalbe
through the "Assignments" page, or by clicking
here.
- Wednesday 09 October: One more OOT sale
-
Some students did
not realize that the version of OOT that comes with the Grogono text
is 2 years old, and that there have been
many enhancements and fixes since then.
As a result, Holt Software has decided to give the students one more, brief,
chance to to buy the up-to-date software at the discount price.
The sale will be held Friday October 18th, 1996 from 10:00 an until
12:30 pm at 203 College Street, Suite 305. The prices will be the same
as the previous sale and Holt Software
will provide the forms for the students to fill out.
- Wednesday 09 October: Last day to switch to 108
-
Today is the last day to switch from csc148 to csc108.
If you decide to make the switch, you must (1) officially drop 148 and
add 108, and (2) talk to your 108 instructor as soon as possible,
at their next lecture or office hour.
A list of office hours for all csc courses is posted
on a corkboard outside SF 2304
(down the hall from my office).
- Wednesday 09 October: Assignment 1 -- Don't use arrival probabilities near 1
-
Be careful not to exceed your disk quota on the PCs;
If you exceed it, you may be unceremoniously logged
out and unable to log in again.
(If this happens, contact the site coordinator or Diane Horton
to have it fixed.)
One way to exceed your quota is by producing large amounts of
output from your simulation program, and redirecting that output to a file.
An infinite loop can cause this to happen, but
it can also happen if you choose an arrival probability of, or near, 1.
- Tuesday 08 October: Assignment 1 -- What the driver imports
-
Question:
In writing the driver for the module StudentSet, are we allowed to
use anything from the other modules (for example:
StudentGen.generateStudent), and/or can we export more from StudentSet
than would normally be allowed (for example: can we export nodeType)?
Answer:
You can import into your driver any of the modules that you need
in order to do your testing of StudentSet.
You will probably need Stud, and maybe StudentGen.
But you cannot change any of our code, for example by
exporting nodeType.
- Tuesday 08 October:
-
Assignment 1 must be submitted to the 148 drop boxes
on the second floor of the Sandford Fleming Building,
near room 2305A.
This is between the elevators and the bridge to the D.L. Pratt Building.
Turn left as you exit the elevators and left again immediately.
The boxes are labelled.
- Tuesday 08 October: Assignment 0 is marked
-
Everyone has been sent mail indicating their mark on the assignment.
If your program did not correctly handle some of our test cases,
the email will tell you which ones. It refers to the test cases by number;
You can look up the actual test case on the course web page.
They aren't there yet, but will be soon.
I will post the marks, along with the class average and distribution of
marks, on the corkboard in the hall outside my office (SF2302c).
- Tuesday 08 October: Professors' office hours
-
Professor Borodin is co-teaching his section of csc148 with Professor Cook.
During weeks that Professor Cook is teaching, he will cover the office hours.
His office, SF 2302c, is directly across from Professor Borodin's.
Also note that
their Friday 11:00 office hour is to Thursday at 11:00.
- Tuesday 08 October: Assignment 1 -- More on marking nodes as deleted
-
Question:
When we change the StudentSet module,
should the revised removeElement procedure reduce the numElements counter by one?
One could
have two variables, one for the number of nodes in the linked list
and one for the number of elements not marked as deleted.
Answer:
You may decide how to use the numElements counter, and also whether or not
to use two counters rather than one.
Just be sure that the behaviour of your exported subprograms is correct.
Question:
Similar questions can be asked for other proc/functions in the module.
For example, should printSet print all members or just those not marked as removed?
Answer:
The behaviour of printSet should be exactly the same in your
revised version of the module as in the original version of the module.
printSet must print exactly those things that are in the set.
It's up to you to figure out how to accomplish this, now that you have
modified the data structure.
Question:
Should we also change the StudentSet.clear procedure to match the
"marked as deleted" approach as stated in 2?
Answer:
To clear the entire set, one could simply mark every element as deleted,
or one could take the opportunity to clear out all memory used.
Both are consistent with the mark-as-deleted strategy.
I'd like you to take the latter approach: clear out the memory used.
Your revised clear routine (from step 1 of Part A) can thus be used, unaltered.
(This way, your testing in Part C will demonstrate that your revised clear works.)
- Tuesday 08 October: Assignment 1 -- Experiments
-
Question:
In Part D, we were supposed to design a experiment regarding the
behaviour of the cars and students.
Can you suggest some possible experiments that we can
try?
Answer:
No, but here's a way to think about it:
Imagine that you are working on the St George Street renovation,
and that you have bought a crosswalk (perhaps an arm that physically comes
down to close the street to cars, and a controller box)
that works just like in the simulation.
What questions can the simulation answer for you?
Part of your marks will be for coming up with a good question.
If you bring your proposed question to your professor's office hours,
he or she may be able to give you some feedback on it.
- Tuesday 08 October: Assignment 1 -- Output content and format
-
There is some confusion about what to print under what conditions.
The handout is quite clear, I think,
but just to make sure everyone understands, here is a summary.
There are 3 possible parts to your output.
(1) The tracing of every single event (arrivals, crossings).
This is included if and only if shouldPrintEvents is true.
(2) The state summaries (shown boxed in the sample runs).
These are a snapshot of the state of the system at a single point in time,
and they are included at appropriate intervals
if and only if the state reporting frequency is not 0.
(3) The summary statistics at the end of the simulation.
These are always printed.
Question:
If shouldPrintEvents = FALSE, then should
we print the headers at the beginning of every step (eg, "---- Step 9 ----")?
Answer:
Don't bother printing the step headers
if you are not printing events.
Question:
When "Should we report every event?" is false does this mean that printouts
of both the arrivals and crossings are suppressed? i.e., the only thing
that prints out is the summary of system state (presuming that it is not
set to zero).
Answer:
Yes.
Question:
Does the style of the output need to look just like the sample
outputs, or can it look a bit different as long as all the relevant
information is reported?
Answer:
It can look a bit different.
But do keep the marker in mind; if you change the format a lot it will
make their job harder, so I would hope you changed it for a good reason
(ie, to make it a lot nicer to read).
Question:
In my output, the spacing between
the state summary boxes is not terribly uniform. Should I worry about this?
Answer:
Don't confuse the reader by having 2 blank lines in one spot and 12 in another.
Otherwise,
just be sure that your output is tidy looking and easy to read.
- Tuesday 08 October: Assignment 1 -- About the driver
-
Question:
I would like to know if we will have to hand in the driver program we
have written to test the operation of the StudentSet. Also, will it
be graded for style, comments, etc?
Answer:
Please read the handout carefully.
Under "How to submit your assignment" it says
"For part C: a printout of your driver program".
Your driver program will not be held up to quite the usual standards
for style and comments.
For example, it will probably be a very specific program, full of
"magic numbers" and not of much use beyond this assignment. That's fine.
- Monday 07 October: Assignment 1 -- Marking nodes as deleted
-
Question:
In step 2 of part A it says to use another approach
by leaving the element but to mark it as deleted.
What does that mean?
Answer:
Exactly what it says. You don't bother physically removing the node from
the linked list. Instead, you keep track (probably using a boolean field
within the record) of the fact that although the node is in the linked list,
it represents an element that is NOT in the set any more.
Analogy: you have a written list of things to do and you finish one of them.
You don't have to erase it from the page. You can just mark it somehow
(e.g., with a check mark) so you'll remember that even though it's still
written on the page, it's no longer part of your to-do list.
Question:
It says you can modify the nodeType.
Does that mean you have
to change all the procedures in the whole program?
Answer:
Certainly not! If changing the
data structure in one module caused us to have to make changes throughout
the entire program, them we must have done a very bad job designing the
program. The whole point is that we'll have to change ONLY the subprograms
within the StudentSet module.
Question:
When it says other
subprograms must examine the extra field,
which subprograms are you referring to?
Answer:
You'll have to figure out which StudentSet subprograms are affected. Once
you understand the mark-as-deleted strategy, this will be easy to figure
out.