Docsity

Submitting Computer Homework: Instructions for Students, Assignments of Kinematics

Toggle sidebar
bg1
Submitting Computer Homework
Harry H. Cheng, Professor
March 27, 2007
In order to make it easier for you to turn in your computer homework, and easier for the
person grading them, I will outline a standard way to submit computer homework. Generally,
you turn in two or three parts of the computer assignments:
1. program code
2. output or solution
3. plots
Program code consists of your actual program (or programs) that you typed in yourself,
the output is what the computer program sends to the screen and the plots are graphs that
your program generates and displays on the screen.
To submit your computer homework, use an IDE such as ChSciTE or a text editor such
as Notepad to open your programs and print them.
1 Run Your Program
1.1 Run from ChSciTE in Windows and Linux
Run your program based on the instruction available under ChSciTE Help menu of ChSciTE.
It is also available at http://chscite.sourceforge.net.
1.2 Run from TextWrangler in Mac OS X
Run your program based on the instruction available under Ch TextWrangler. More infor-
mation is available at http://iel.ucdavis.edu/projects/chide/textwrangler.
1.3 Run from Ch Command Shell
1. Launch a Ch command shell. In Windows, just double click the icon of Ch on the
desktop. In Linux and Mac OS X, type ’ch’ in a command shell.
2. Change the directory where your program is located.
1
pf3
pf4

Partial preview of the text

Download Submitting Computer Homework: Instructions for Students and more Assignments Kinematics in PDF only on Docsity!

Submitting Computer Homework

Harry H. Cheng, Professor

March 27, 2007

In order to make it easier for you to turn in your computer homework, and easier for the person grading them, I will outline a standard way to submit computer homework. Generally, you turn in two or three parts of the computer assignments:

  1. program code
  2. output or solution
  3. plots Program code consists of your actual program (or programs) that you typed in yourself, the output is what the computer program sends to the screen and the plots are graphs that your program generates and displays on the screen. To submit your computer homework, use an IDE such as ChSciTE or a text editor such as Notepad to open your programs and print them.

1 Run Your Program

1.1 Run from ChSciTE in Windows and Linux

Run your program based on the instruction available under ChSciTE Help menu of ChSciTE. It is also available at http://chscite.sourceforge.net.

1.2 Run from TextWrangler in Mac OS X

Run your program based on the instruction available under Ch TextWrangler. More infor- mation is available at http://iel.ucdavis.edu/projects/chide/textwrangler.

1.3 Run from Ch Command Shell

  1. Launch a Ch command shell. In Windows, just double click the icon of Ch on the desktop. In Linux and Mac OS X, type ’ch’ in a command shell.
  2. Change the directory where your program is located.
  1. Clear the screen by typing command clear
  2. For program myhello.c, run it as follows: ~/EME5-01> myhello.c > output.txt output.txt is the file which stores the output of your program.
  3. Open Notepad or any other text editor to open the output.txt, then print it out.

2 Obtain a Screen Shot

2.1 Method 1: Use GIMP to Obtain a Screen Shot

Download GIMP from http://www.gimp.org/windows/ for Windows and http://www.gimp.org/macintosh/ for Mac OS X. It can be used to acquire an image from the screen using the following procedure.

  1. Click menu File,
  2. click menu Acquire,
  3. click menu Screen Shot,
  4. click Grab. Then, move the cursor to a window to be acquired.
  5. Save or print out the acquired window.

2.2 Method 2: Use Paint Program to Obtain a Screen Shot

Make sure the Ch window with your program is on top and then take a picture of the screen using the print screen button.

  1. Open Paint from the Start/Accessories menu.
  2. Select paste from Edit menu.
  3. Answer yes to the dialog box.
  4. From the toolbox on the left side select the perforated box.
  5. Highlight the Ch window with your run program by clicking and dragging from one corner to the other.
  6. Select copy from the Edit menu.
  7. Open a new Paint document by selecting new from the File menu.

Then, print out the plot in postscript file using acroread or program ghostview. Or print out the plot in PNG file using a Web browser.

  1. For Mac users, use Ch TextWrangler, follow instructions at http://iel.ucdavis.edu/projects/chide/textwrangler.
  2. Use program xv to grab the plot off the screen, save it as a Postscript file, then print out the file. Follow the following procedure: (a) type xv; (b) move cursor to the xv window and click right button of the mouse; (c) click ”Grab” in xv control panel with right button of the mouse; (d) Move the cursor to the upper left corner of the picture, hold down the mid button of the mouse and drag it to the lower right corner of the picture, then release the button. (e) Click ”Save” in the xv control panel and save the picture in postscript file. (f) print out the saved file using command lpr.