Lab 14 Solution


Category: Tag:



I have provided an unchangeable cscd240Lab14.c file.

I have provided

    1. fileUtil.h, a portion of fileUtil.c

    1. genericArray.h

    1. stock.h

    1. utils.h, utils.c

You only need to write following:

    1. fileUtil.c

      • countRecords

  1. stock.c

    • buildStock

    • printStock

    • cleanStock

    • compareSymbols

    • compareNames

    • comparePrices

Think of each one of these as a Comparator compare method from Java

  1. genericArray.c

    • fillArray

This is different from what we wrote in class. The parameters are different so please read the documentation.

    • sortArray

Use the selectionSort to sort the array – qsort won’t work and I will explain why in class.


Submit a zip file

Lab14 folder – containing all C files and H files My Makefile

Your input files – meaning mine and at least one other that you made (not a copy and paste of mine) A valgrind run named cscd240lab14val.txt

Your zip named your last name first letter of your first name (Example:

NOTE: A simple output run is included as simpleOutput.txt

error: Content is protected !!