next up previous
Next: About this document ...

Assignment notes: stage 1
CSE3301: SAR (C.Twardy)
March 12, 2001
Target date: Friday 23 March.

  1. Your program should read in (1-100) areas from the areas file using the comma-separated format (one record per line):
    For example: 2, 1280, 4459, 0.1, 50, 2, 25, 5. You may want to do some error-checking. Do the POAs add up to 100? You might want to warn the user if RestOfWorld has a very high or a very low POA. Likewise if BaseCamp has a nonzero POA. Anything else?

  2. Read some number of resources from the resources file. Example: Hasty Team, 30, 10, 6.5, 3

  3. Read assignments from assign.dat, in the format resourceNum, area. Example: 2, 97. Check that the assignments are possible. The assignments are for one period only, so presume that one team cannot receive two assignments. All teams need to be assigned, although some will be assigned to Base Camp (area -2). You may wish to consider in the future keeping tabs on how long a resource has gone without rest. Carry out any other error-checking you think advisable.
  4. Print the original POA table. A grid would be a nice format. You may wish to be fancier, but include a basic number grid.

  5. Update the POA for this assignment, and print the new POA table.

  6. In general: ignore any comment lines or blank lines in the files. Comment lines begin with # or with %. Figure out how many lines there are as you read. Save your program as updatePOA, and write it to be run in batch mode so that I may type updatePOA area.dat resources.dat assign.dat and get the result on standard output. For the moment, we are ignoring many of the fields. You will want to consider how to update the POA given an LKP.

  7. Internal documentation: each function must identify its author. All but the most trivial functions should explain what they do.




next up previous
Next: About this document ...
Charles Twardy 2001-03-12