Starting from:
$30

$24

Lab 11 Solution

SPECIFICATIONS




I have provided an unchangeable cscd240Lab11.c file. Your task is to write the functions.



You will need to create a structure named Stock.



The Stock structure will only contain



char symbol[10];

char companyName[100];

double currentPrice;







The menu portion will contain:

Print the array sorted by symbol
Print the array sorted by company name
Print the array sorted by current price
Quit



You must verify range of the menu.



The input will come from a file, name entered by the user. You must ensure the file opens.



There is nothing tricky here, no hidden agenda, just trying to get you to work with structures.



You must write your own sort, you can’t use qsort or any built in sort.



FILE STRUCTURE

symbol




company name




current price







TO TURN IN

Submit a zip file of Lab11




Containing your C files and H file(s)



My Makefile



Your input file(s)



Include an output captures from running your program named cscd240lab11output.txt.



NOTE: nothing dynamic here so no valgrind






Your zip will be named your last name first letter of your first name lab11.zip (Example: steinerslab11.zip)

SAMPLE RUN

Please choose from the following




Sort by Symbol



Sort by Company Name



Sort by Price



Quit



Choice -- 1




Google - GOOG - 721.110000




Hillenbrand Inc - HI - 30.650000




Microsoft - MSFT - 53.240000




Charles Schwab - SCHW - 31.370000




Please choose from the following




Sort by Symbol



Sort by Company Name



Sort by Price



Quit



Choice -- 2




Charles Schwab - SCHW - 31.370000




Google - GOOG - 721.110000




Hillenbrand Inc - HI - 30.650000




Microsoft - MSFT - 53.240000




Please choose from the following




Sort by Symbol



Sort by Company Name



Sort by Price



Quit



Choice -- 3




Hillenbrand Inc - HI - 30.650000




Charles Schwab - SCHW - 31.370000




Microsoft - MSFT - 53.240000




Google - GOOG - 721.110000




Please choose from the following




Sort by Symbol



Sort by Company Name



Sort by Price



Quit



Choice -- 4




all done

More products