1. Program Correctness (75%): The programs do everything that the lab requires. If you have a question about how a program handles a certain input, check the executables that have been provided.

    1. avg (15 points)
      • the program uses the fields library in the appropriate way (7 points)
      • the format used for the output corresponds to the program specs (2 points)
      • the amount for each transaction is correctly computed (2 points)
      • the average transaction amount is correctly computed (2 points)
      • input is read from stdin (1 points)
      • appropriate error checking is performed (1 points)

    2. name (20 points)
      • the program uses the fields library in the appropriate way (5 points)
      • the program uses the dllist library in the appropriate way (5 points)
      • the format used for the output corresponds to the program specs (2 points)
      • each name is printed at most once (3 points)
      • each name in the transaction file appears in the output (3 points)
      • input is read from stdin (1 points)
      • appropriate error checking is performed (1 points)

    3. sort_date (30 points)
      • the program uses the fields library in the appropriate way (5 points)
      • the program uses the dllist library in the appropriate way. In particular the program inserts transactions into the dllist in ascending order (10 points)
      • the format used for the output corresponds to the program specs (2 points)
      • the transactions are printed in ascending order by date (9 points)
      • input is read from the file specified on the command line (1 point)
      • appropriate error checking is performed (3 points)
        • check that exactly one command line argument is provided
        • check that the provided filename exists
        • malloc checks
    4. stock (35 points)
      • the program uses the fields library in the appropriate way (5 points)
      • the program uses the dllist library in the appropriate way. In particular the program uses one dllist to keep track of stocks in ascending alphabetical order and for each stock uses a dllist to keep track of transactions (15 points)
      • the format used for the output corresponds to the program specs (3 points)
      • stocks are printed in ascending order (4 points)
      • the output is correct (4 points)
        • the average transaction cost for each stock is correct
        • transactions are printed with their respective stocks
      • input is read from the file specified on the command line (1 point)
      • appropriate error checking is performed (3 points)
        • check that exactly one command line argument is provided
        • check that the provided filename exists
        • malloc checks

  2. Commenting (15%): See the commenting information on the course's web page for advice on how to comment your programs,

  3. Program Style (10%): Are the programs well-organized and do they solve the problem in the most straightforward, efficient way possible?