The objectives of this lab are threefold:
The purpose of this task is to meet with your teammates for the semester and decide among yourselves the details of how your team will operate. All of the members of your team should sit at workstations in the same row in the lab, beginning with this lab and in the future. You should spend at least an hour of this lab period discussing team issues with the members of your team. In particular, you should:
One member of the team should write-up the team goals and expectations, and your team name in a file, and send it to me (chris.uh.class@gmail.com) with copies to all members of the team and your TA.
In the following problems you are asked to create five C program source files, compile them, and get them to work. You should do this lab individually; however, you can consult with your teammates and the TA to get help. Each individual should turn in all five files as described below by the end of your lab period.
Given the time an object falls,in seconds, compute the velocity of the object when it hits the ground using:
velocity = g * time
and the distance it fell using:
distance = g * t * t / 2
For this problem, setting the value of time in the program and processing one set of data is sufficient. My code for this program (with comments showing the algorithm) can be found in the file ~ee160/Labs/Lab2/gravity.c, but it contains some errors. Your job is to copy the file to your directory (use the cp command) and fix all of the errors so that the program compiles, runs and produces the correct answer.
You have created five ".c" files in your EE160 directory for Lab 2, but there will be many more files in future labs, so you should create a directory for these files as follows:
Use the "grade" command to turn in these five programs (welcome.c, myname.c, myinfo.c, pay0.c and gravity.c). Your command will look like the following:
The format is 'grade -lab#s@,ee160 file1.c file2.c' -
(# = lab number, @ = section number) Make sure to replace # and @ accordingly.
The above command submits file1.c and file2.c
If you are in Section 001 use:
grade -lab2s1,ee160 welcome.c myname.c myinfo.c pay0.c gravity.c
If you are in Section 002 use:
grade -lab2s2,ee160 welcome.c myname.c myinfo.c pay0.c gravity.c
If you are in Section 003 use:
grade -lab2s3,ee160 welcome.c myname.c myinfo.c pay0.c gravity.c
If you are in Section 004 use:
grade -lab2s4,ee160 welcome.c myname.c myinfo.c pay0.c gravity.c
You should verify that you turned in things successfully, which you can do with the grade command by simply leaving the file names off from the previous command:
grade -lab2s1,ee160
OR
grade -lab2s2,ee160
OR
grade -lab2s3,ee160
OR
grade -lab2s4,ee160