Assignment 4 data question.


R. Clayton (rclayton@monmouth.edu)
(no date)


  I did not understand the meaning of this paragraph in the assignment: "Your
  implementation of maximum_placement() should not exploit any extra properties
  of the input data; I'll be generating different input data when I test your
  assignment."

  I would appreciate if you could explain it.

Sure. Students examine the test data they get from main.o and discover some
property about it: the data are sorted in ascending order, the data are all the
same size, the data are a tree, or whatever. They then write their code to
exploit these properties. They submit their code and I test it on data that is
in descending order, or randomly ordered, or of different sizes, or not a tree,
and their code fails. Now the students are upset because I'm being unfair and
testing their code with data different from what I gave them before.

The paragraph you quote is just warning you not to make the same mistake your
colleagues in previous classes have made. "do not exploit any extra properties
of the input data" means what it says: your code should rely only on properties
specified in the problem statement. "I'll be generating different input data
when I test your assignment." also means what it says: the data I use to test
your code will not be the same data you're getting from main.o right now.

Let me know if you have any other questions.



This archive was generated by hypermail 2.0b3 on Fri May 09 2003 - 15:30:05 EDT