Assignment 01

Due: Wednesday, August 28, 2013 @ 4:00 pm

Points Possible: 50

For this assignment, you will type and submit three (3) algorithms. Make your algorithms clear and concise step-by-step procedures that solve the problems given. I think that each of these should require at least three steps and probably (though, possibly) no more than twenty steps. Think about your answers.

You are to edit a single file in your DFS account using one of the editors that your lab instructor has shown you in your CS 54 lab #1. First though, make a new directory under your home directory and call it cs53 (from home, type mkdir cs53 and enter). Change into that directory (cd cs53). Now, make a new directory under this cs53 directory and name it hw1. Change into that directory and then create the file with your answers in it, naming it something clever like "hw1.txt". The .txt extension is used for files that are nothing but text (not to be compiled). What ever you name that file, make sure it has a .txt extension. This assignment is NOT C++ programming. You are not to compile this. In this (one and only) file (for this assignment), you are to number your answers for the following 3 problems. Also, be sure to put your name and section letter at the top!!

  1. You are driving down the highway. You run over a pair of scissors and the rear tire goes flat tire

      1. . (No, we don't care which one.) You have class in 30 minutes and must get there on time. In order to fix the flat yourself, you need a lug-wrench, a jack, and an inflated spare tire. If you don't have any one of these, you must call for help. Write a step-by-step description of how you are able to continue your drive. If you have never been shown how to repair a flat, have some one in the dorm show you. You never know when you might need this skill! DO NOT look this up on the web. That would be cheesey.

  1. Write an algorithm to convert decimal numbers to binary.

  2. You all learned how to add two fractions in grade school. Do you remember how? Can you teach someone else how? Thought so ... write an algorithm to instruct how to add two fractions. Of course, you will have to include an explanation of such terms as "least common multiple" or "greatest common divisor" if you use them.

To submit this homework, you are going to use the cssubmit program for your section of cs 53. This assignment will be used for all sections. Your answers should be written up using your favorite editer in a subdirectory called hw1 hanging off your cs53 subdirectory. Remember: make a different directory under cs53 for every one of your assignments. From that directory, at the UNIX command, type "cssubmit 53 a 1" if you are in section a. If you are in section b, type "cssubmit 53 b 1". If you are in section c, type "cssubmit 53 c 1", etc. (Can you see the pattern?) Hit enter. Of course, when submitting homework #2, your last entry in that command should be a 2. Don't type cssubmit 53 a h2 or some other variant like that; just the digit 2. Use this scheme for subsequent submissions. If you have any questions about using the editor or submitting, just ask. You can look here for guidance on submitting using the cssubmit command.

NOTE: You can submit the same assignments multiple times. If you submit and then remember something you forgot, you can edit your file, save it, then submit again. The new submission will overwrite the old; we won't see the old one. Time stamps on submissions apply to the latest submission. Always run the submit script from the directory in which the file(s) to be submitted reside(s). Any questions, just ask. Remember, there is a due date/time. Try not to exceed that. If you do, it'll cost you.