Homework Expectations

CS2301 - D-term 13

There will be six programming assignments in CS-2301 - about one per week. In each programming assignment, you will write a program in C to use features of the language introduced in class or in the textbook. A completed programming assignment comprises one or more files with the .c or .h extension, plus a written explanation of what you did, the basic algorithm you implemented, and any difficulties that you encountered. Specific assignments may also require you to submit your test data and/or output.

Programming Environment

Most students will carry out their programming assignments on the CCC systems running Linux. These provide the tools necessary to write and debug C programs, including text editors, compilers, debuggers, etc. The lab sessions are designed to help you learn to use these tools. Windows workstations in the public computer labs on campus include the PuTTY program and X-Win server to provide interactive access to the CCC computers.

Some students may prefer to work in their own environments e.g., their laptop or desktop computers at home or in their dorms, which might be Macs, PCs, or Linux systems. This is acceptable, except that there may be subtle differences in the C language or compiler between these environments and the version implemented on the CCC system. All grading will be done on the CCC systems. Therefore, if you develop a program on another computer, you must verify that it still compiles and works correctly in the CCC environment.

Program Editor

You may use any editor you choose for writing and editing your programs. Many computer scientists, especially those who grew up using variations of Unix or Linux, prefer EMACS. However, many non-computer scientists find EMACS counterintuitive and hard to learn.

As an alternative, you could use the text editor kwrite. This has a familiar "point and click" interface that is similar to most Windows and Macintosh applications, including the usual File, Edit, View, etc., menus. To invoke kwrite from a command shell on a CCC system, simply execute the following command in a command shell:

kwrite file_name &
You need to have an "X-Windows" server (such as X-win) running on your computer, so that the CCC system can display the editor window on your desktop. Most computers in the WPI public computer labs have X-win enabled by default. WPI has a campus-wide license for X-win; here are the Helpdesk instructions for installing X-Win on your own computer.

To configure kwrite for editing C programs, start kwrite, pull down the Settings menu and select Configure Editor... In the configuration window that appears, select the Editing icon in the left panel. In the Indentation tab,set the Default indentation mode to C Style (one of the pull-down options). This causes the editor to automatically indent your programs to conform to the usual practice in C, making your program more readable, helping you see matching brackets, parentheses, quotes, etc., and generally making life easier for you as a programmer. (EMACS has similar capabilities.)

Compiling

All submitted programs must compile correctly and without warnings on the CCC system in order to receive any credit for an assignment. If your submitted program does not compile correctly and without warnings using the gcc editor on the CCC sytem, the grade on the program will be 0.

Submitting your Work

You must submit your programming assignments using the web-based turnin program. turnin enables you to submit one or more files as part of your assignment, to verify that they have been correctly submitted, to re-submit (i.e., overwrite) files if necessary, and to check your grade for the assignment and to receive feedback from the graders.

Turnin automatically time-stamps your submissions and identifies those that are late. The graders can download your files to a separate directory, compile your program, and test it against their own data or test cases. Finally, they can upload comments and grades that only you can access.