Not yet updated for Fall 2004. Until it is updated, see the first tutorial in Edgar Troudt's old course packet for information on how to access your Unix account and send email using Pine. You should send email to your lab instructor from your Forbin account by no later than Wednesday, September 8. (The rest of Assignment 1 will be due later.)
CS 111 Assignment 1
- The homework assignment itself
- Files to print out and bring to lecture and recitation
- Preparing to hand in your homework
- The homework assignment itself
First, get a forbin account AS SOON AS POSSIBLE, if you have not done so already.
Then follow the instructions in the following two printed tutorials, which can be found in the Computer Science 111 Preliminary Tutorials, available at the bookstore:
- Tutorial on Telnet, SSH, E-mail, and FTP
- Tutorial on Unix, vi, gcc, and elementary C++ syntax
Work first on the Tutorial on Telnet, SSH, E-mail, and FTP, up to Part 3, in which you send E-mail to your recitation instructor from your forbin account. Then, while waiting for your instructor's reply, begin work on the Tutorial on Unix, vi, gcc, and elementary C++ syntax. A day or two later, reply to your instructor's E-mail reply, as instructed in Part 4 of the Tutorial on Telnet, E-mail, and FTP. After you finish part 6 of the submit the program hello.cpp as instructed in Part 5 of the Tutorial on Telnet, E-mail, and FTP. Then finish the Tutorial on Unix, vi, gcc, and elementary C++ syntax, and submit all your homework files as instructed in Parts 5, 6, and 7 of the Tutorial on Telnet, E-mail, and FTP.
In Part 9 of the Tutorial on Unix, vi, gcc, and elementary C++ syntax, you will be asked to take notes on compiler error messages, and you will be asked to hand in photocopies of your notes. You should take those notes using a black ink pen, if possible, for ease in photocopying.
The first homework assignment consists of four parts, which are due on four separate dates, as follows:
- The Tutorial on Telnet, E-mail, and FTP. parts 1 to 3. See also Your forbin account, and how to access it from home.) Send an E-mail message to your instructor, from your forbin account, by no later than MONDAY, 2/09 for the evening section (WEDNESDAY, 2/11 for the afternoon sections) -- and preferably earlier, to allow yourself enough time for the next part.
- The Tutorial on Unix, vi, gcc, elementary C++ syntax, and I/O, parts 1 to 6, and then the Tutorial on Telnet, E-mail, and FTP, parts 4 and 5. Plan to spend at least 8 to 10 hours on this part of the assignment, including at least several hours just practicing vi before you write the program hello.cpp. Submit the file hello.cpp to your instructor, via E-mail from your forbin account, as instructed in part 5 of the Tutorial on Telnet, E-mail, and FTP, by no later than WEDNESDAY, 2/11 for the evening section (SUNDAY, 2/15 for the afternoon sections).
- The Tutorial on Unix, vi, gcc, elementary C++ syntax, and I/O, parts 7 to 16. Plan to spend at least 8 to 10 hours on this part of the assignment as well. Then, as instructed in part 6 of the Tutorial on Telnet, E-mail, and FTP and in Preparing to hand in your homework on the Assignment 1 page, submit a tar file containing all the listed files, by no later than TUESDAY evening, 2/17 (for all sections).
- Submit printouts in recitation on WEDNESDAY, 2/18 (for all sections), as instructed in part 7 of the Tutorial on Telnet, E-mail, and FTP. The printouts should be identical to the files you submitted via the tar file.
Be sure to E-mail your homework to the correct address.
- Files to print out and bring to lecture and recitation
Please print out copies of the following example files and bring them to lecture and recitation during weeks 1 and 2. However, please do NOT print these out in an on-campus lab. (On-campus printers are to be used only for your homework, i.e. for files YOU wrote, not examples.) If you do not have a computer at home, with a printer, ask a friend or classmate to print out copies of the following files for you.
The example files below are best viewed using Netscape (NOT Microsoft Internet Explorer).
Unless otherwise specified, most of the following files are program examples used in the Tutorial on Unix, vi, gcc, and elementary C++ syntax.
- Examples not part of tutorial, used in lecture, week 1:
- Examples for part 8 of the Tutorial on Unix, vi, gcc, and elementary C++ syntax: Some C++ syntax basics:
- Examples for part 10: Integer vs. floating-point division:
- Programs which generated the tables in the tutorial, part 12: More about data types:
- Examples for part 13: Library functions:
- cubeFunctionDemo.cpp
- Table of commonly-used math functions, to be linked here soon.
- sineDemo.cpp
- Examples for part 15: Characters and strings:
- Examples used in recitation, week 2:
- Preparing to hand in your homework
Assignment 1 consists of four parts, which are to be submitted on the four separte due dates given earlier on this page.
For part 3 of the homework assignment, you are told to create a tar file. Before you make the tar file, be sure to run the script file, as instructed in part 6 of the Tutorial on Telnet, SSH, E-mail, and FTP. Remember to edit your programs so that they can be run by the script file.
If the script file does not find your files, check your filenames. If the simulated inputs are not displayed, or are displayed in an ugly fashion, double-check whether your prompts and other outputs have the correct format, as specified above.
After you succeeded in running the script file so that it runs all your programs with nice looking output, see the Tutorial on Telnet, E-mail, and FTP part 6, for instructions on how to create the tar file. The tar file should contain the following source code files:
- hello.cpp (part 6 of the Tutorial on Unix, vi, gcc, and elementary C++ syntax)
- averageOf3.cpp (part 10)
- celsiusToFahrenheit.cpp (part 11)
- hypotenuse.cpp (part 14)
- initialsCString.cpp (part 16)
- initialsString.cpp (part 16)
Each of your source code files should include, in a comment at the top, your name (as known to the Registrar's office), your recitation section designation, and your forbin accountname.
The tar file should NOT contain any other files besides the ones listed above. In particular, it should not contain any compiled executable files, e.g. a.out, which take up lots of disk space.
E-mail the tar file to your instructor. The tar file must be sent to the correct E-mail address for your recitation section.
You should also make printouts of the above-listed files, as instructed in the Tutorial on Telnet, E-mail, and FTP part 7. Your printouts must be stapled together in the order listed above. In addition, at the back of the bundle of printouts, attach photocopies of the error messages you copied down in part 9 of the Tutorial on Unix, vi, gcc, and elementary C++ syntax. Hand in your bundle of printouts in recitation only, nowhere else.
Back to: