Homework List for Lab Techniques
The programs listed here should be written in C, unless otherwise
noted.
Feel free to work in pairs; to save time and trouble, just hand in
one copy of the problems and put both names on it. Do not work in
groups larger than pairs. Be sure you understand how each problem is
solved; do not rely only on your partner. On the exams, you will be on
your own.
Printing instructions:
Programs should be neatly formatted and printed.
Instructions for doing these on Elvis can be found listed on the menu to
the left.
Do not turn in the printer's cover sheet, or mark on your assignment
with a pen or pencil. Everything I need to know should be in the
code and relevant comments. If you have to write your name on with
a pen, that just means that you didn't comment your program correctly.
Be sure to review the Program
Evaluation Criteria; you will be held responsible for every item
listed.
- One: Simple Statistics (due 3 September 2009)
- Write a program in any language which
reads in numbers from the keyboard until it gets a zero. Then
print out the number of values entered, the sum of all values,
the largest number, the smallest number, and the
average of all the numbers.
This homework is the "can you program?" homework, to see if
you're ready for this class. You may use any language you
like.
- Two: Simple Statistics (due 9 September 2009, 23:59:59)
- Get your Homework One program to compile and run on Elvis.
Mail it to me as an attachment before the clock ticks over to
Thursday, 10 September. (You can handle mail on Elvis using the
program "pine". You can edit simple files using "pico NAME",
where NAME is the name of your file. For this one, cut and paste
with a mouse should probably work.)
- Three: Statistics in C (due Thursday, 17 September 2009)
-
Re-do homework 1 in C. Don't copy mine, convert yours. If you
haven't got the C book yet because the bookstore screwed up,
this one has a flexible due date.
- Four: PNGlook (due Thursday, 1 October 2009)
-
Re-write giflook to be pnglook. Email me the source code when it
works. Be sure to put something like "pnglook" or "homework 4" in
your subject line.
- Five: Pipeline Homework (due 8 October 2009)
-
Download and fill in the Pipe Homework.
- Six: Simple Digital Clock (due 29 October 2009)
-
On Elvis, in my ~/LabTech/ClockLED directory, is a
complete set of files to make a simple version of the digital
clock. There is a text file describing the layout, and the C
code for a main loop. What's not there is the code needed to
convert the time characters into bits to switch on the right
LEDs. Write that part of the program and make it work. Email
me only the revised "clock-led.c" file.
- Seven: Fancier Digital Clock (due 12 November 2009)
-
The LED-layout.txt file in my
~/LabTech/ClockLED directory on Elvis has been updated
with information about the colons and the AM/PM/24H indicators.
Nothing else has changed, so that's the only file you need to
copy over again.
You should make an RCS directory and check in your clock-led.c
file. Then you should check it out before making the following
changes.
Add command-line flags to your clock using
getopt(3c), so that I can specify from the command line whether
to run in AM/PM or 24 hour mode. (The default should be 24H.)
Also, add a flag that says whether the dots blink or not. (You
can add more if you like.)
The flag for AM/PM mode is "a". The flag for blinking is "b".
(Be sure that "-V" and "-h" also work.)
|