====== LABS ======
===Introduction===
This course has weekly labs.
* Labs are submitted electronically.
* The due date is Wednesday midnight of every week (there is no submission for lab 1, you have to demo the lab to the TA during the lab time.
* labs are marked electronically, 75% of the marks are calculated by comparing your code output to the model output. That means you have to be very careful. Follow the specifications carefully, an extra comma, new line, or a space might make the difference.
----
----
----
===Lab 1 ===
DO NOT SUBMIT LAB 1
----
----
----
===Lab 2 ===
{{:lab_2.pdf|LAB 2}} Due Sept. 30 2020
Here is the {{:lab_2_model.pdf|Test cases}} and the corresponding output
**Note** : There is a bug in the model answer, 1 1 9 should be WIDE APART, that will be corrected and added. If you have any other complaints (other than the above) please contact mkidris@eecs.yorku.ca
**Marks distribution** 5+5+5
**//Model Answer//** {{:lab2_1.txt|}} {{:lab2_2.txt|}}
----
----
----
===Lab 3 ===
Friday Oct 2nd and Monday Oct 5 {{:lab_3.pdf|LAB 3}} Due Sept 30
Here is the {{:lab_3_model.pdf|Test cases}} and Model Answer
If you have any marking issues, please contact parhammh@eecs.yorku.ca
**Marks distribution** 3+3+4
**//Model Answers//** {{:lab3_1.txt|}} {{:lab3_2.txt|}} {{:lab3_3.txt|}}
----
----
----
===Lab 4 ===
Friday Oct 9 should be Oct 2 and Monday Oct 12 Should be Oct 5 {{:lab_4.pdf|LAB 4}} Due Oct 7 I will post some examples on text files for this lab soon
Here are two example files {{:names.txt|names.txt}} and {{:products.txt|products.txt}}
**Correction** In the file names.txt, inder name "Isabel Coppedge" there are two keys, that is a typo. Please remove one of them. Only one product ID per entry
**//Model Answers//** {{:lab4_1.txt|}}
If you have any concern, **After you verify your code with the test cases** you can contact Abdullah a89@eecs.yorku.ca
----
----
----
===LAB TEST ===
here {{:lt1.pdf|Lab Test 1}}
Here are the instructions on {{:test_cases_test_1.pdf|testing}}
Here are the files {{:a.txt|A.txt}} {{:c.txt|C.txt}} {{:b1.txt|}} {{:b2.txt|}} {{:b3.txt|}}
{{:t1_sol.pdf|Lab Test 1 solution}} **//Note//** in q1 it should be if [ ! -d $i ]
----
----
----
===LAB 5===
Lab 5 is here {{:lab_5.pdf|LAB 5}} and is due Wed Oct 21
Examples for input
Part 1
5
2 3.2 -4.5 1.7 2.8
//The output//
NO
**Part 2**
This is your input followed by carriage return
The output
4
this should be displayed in 6 places right justified
**Part 3**
This is the 78b$56 input
//the output is//
24
4
5
**//Model Answer//** {{:lab5_1.txt|}} {{:lab5_2.txt|}}
__Test Cases__ {{:test_cases_lab5.pdf|Test cases}} for part 3, you have to make your own test cases because tabs and spaces will not show well in a pdf file. Use a combination of tabs and spaces in your cases
----
----
----
===Lab 6 ===
Here is {{:lab_6.pdf|Lab 6}} Note that the matrix is inputted in a row major format
Due date: Wed. 28, 2020 midnight
Here are some examples for I/O of Lab 6 {{:lab6_examples.pdf|test cases}}
Model answers {{:lab6_1.c|}} {{:lab6_2.c|}} {{:lab6_3.c|}}
----
----
----
===Lab 7===
Here is {{:lab_7.pdf|}} it is **Due Oct 11 ** Note that does NOT mean there is no lab next week. There is lab 8 and will be due Nov 11 too
=== Test cases ===
**Part 1** {{:71a.txt|Test case}}
**Part 2 ** {{:72a.txt|test case 1}} {{:72b.txt|test case 2}} {{:72c.txt|test case 3}} {{:72d.txt|test case 4}}
**Part 3** {{:73a.txt|test case 1}} {{:73b.txt|test case 2}} {{:73c.txt|test cases 3}}
**Model Answer** {{:model.txt|for the above cases}}
**Solution** part 1 {{:lab7_1.c|lab7_1.c}} part 2 {{:lab7_2.c|lab7_2.c}} part 3 {{:lab7_3.c|lab 7_3.c}}
----
----
----
===== LAB TEST 2 =====
Here it is {{:lab_test_2.pdf|Lab Test 2}} Note you submit to three different directories as stated **//Submit all files as .c//**
//**Possible solutions**//
{{:q21.c|}} I printed the sum of the main diagonal and anti diagonal, easy to modify
{{:q22.c|}}
{{:q23.c|}} In this solution, I stopped at finding the match, keep i value and that is the solution
----
----
----
===== LAB 8 =====
Lab 8 is here {{:lab_8.pdf|Lab 8}} {{:write.c|write.c}}
**//T name format is fname lname//** here is one example of the dat.txt file
For example, you do
a.out -name John
You display all students with first name John as follows
ID John Black B
Note, there are tabs not shown in the above
**Solution** {{:read.c|lab8.c}}
Here is the data file [[http://www.eecs.yorku.ca/~aboelaze/dat.txt|dat.txt]]
**IMPORTANT**
before contacting test your code. How
It is a little bit problematic for me to upload a binary file here, so compile and run this program {{:makeinput.c|makeinput.c}} using this input file {{:input.txt|input.txt}}
This means, compile the C file and run it as
a.out < input.txt
That generates the dat.txt file that you will read it in your lab.
Then run the code you submitted 9after compiling it of course as such
a.out -count
a.out -grade A
a.out -grade C
a.out -name John
a.out -name Leslie
The output should be
**case 1**
4
**case2**
St. ID Name
1234 John Doe
4567 Leslie Rider
**case 3**
St. ID Name
3456 John Jack
**case 4**
1234 John Doe A
3456 John Jack C
**case 5**
4567 Leslie Rider A
----
----
----
===== LAB 9 =====
Lab 9 is {{:lab_9.pdf|here}} The lab is due Friday Nov 20
**//Part 2 should be submitted as lab9_2.c//**
**//Solution for part 2//** {{:hist.c|lab9_2.c}} In this lab, I read the data fist in an array and get the max number. For part 1, you read the max already
---------------------------------------------------------------------------
===== LAB 10 =====
Here are some documentation about the OM4000 board
* {{:lpc802.pdf|LPC 802 data sheet}}
* {{:user.pdf|User manual}}
* {{:sch_lpcxpresso802_ver_a.pdf|Schematic}}
{{:lab_10.pdf|Lab 10}} Due Friday Nov 27
== Example solution == {{:lab_10.txt|Lab 10 solution}}
----
----
----
== Lab 11 ==
{{:lab_11.pdf|Lab 11}} Lab 11 is due Dec 8 midnight
----
----
----
== Lab 12 ==
{{:lab_12.pdf|Lab 12}} Lab 12 is due Dec. 8 midnight
----
----
----
==== LAB TEST 3 ====
{{:lab_test_3.pdf|LAB TEST 3}} due 4:00pm