User Tools

Site Tools


labs

This is an old revision of the document!


Table of Contents

LABs

LAB 1

Lab 1 is here for lab 1, the grade is on attendance. You must submit the deliverable during the lab time.

You will get a marking report for the program but it will not be counted towards your final grade. This is only an example of how we mark your work.

Always check the lab during the lab hours. Some times there will be some changes/modifications to make it clearer. The changes are in bold red font so it will be easy for you to spot it

LAB 2

Lab 2 is here. I will post soon samples input and outputs. You have to prepare your own set. My set will not cover all scenarios.

here is an example in file and out file

Please use od to see the contents of the files.

a detailed description is here. Every line contains the stock price, the changes from the previous day, and the action taken

labs are due midnight Friday

here is one way to implement lab 2 invest.c note that the programs explain what is happening every day not just prints the results

LAB 3

Here is Lab 3 (n < 50)

And here are some exercise problems (do not submit)

some input and output files

A BUG in the OUTPUT SAMPLE

please add one line to the output sample file. That line is

123456789 Aboelaze

That line should be added after the second or third line in the output file. Since I didn't specify the order multiple top students should be displayed, either order is fine

LAB 4

Here is lab 4

You can assume that the maximum record length is 50 and the maximum value for k is 256

Also note that I am asking for the number of entries with collisions, not number of collisions.

here is a sample input file and the corresponding output file

here is another input file and sample output detailing the hash table enry. This is not what you should submit, just to help you with debugging I displayed the number of elements mapped to each hash table entry

For both cases, k=10

Here is one way to implement hash.c this is just one way of doing it. There are many other ways, some may be even more efficient.

LAB 5

Here is Lab 5

Note the new due date (feb. 22)

I will be posting test cases and binary files soon

Submit as books.c to L5

Text Cases

If you run the program for the first tome (no book.dat) with this input in1.txt the output is out1.txt and the file book_dat.txt (rename this file to book.dat, it could not be uploaded with extension .dat

if you run the program the second time with book.dat as before, the input is in2.txt and the output is out2.txt

labs.1487367956.txt.gz · Last modified: 2017/02/17 21:45 by aboelaze