Docsity

Submitting Computer Homework: A Step-by-Step Guide by Harry H. Cheng - Prof. Harry H. Chen, Assignments of Software Engineering

Toggle sidebar
bg1
Submitting Computer Homework
Harry H. Cheng, Professor
March 27, 2008
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 ChIDE, ChSciTE, or a text
editor such as Notepad to open your programs and print them.
1 Download a C/C++ Interpreter
Download the C/C++ interpreter Ch Student Edition from http://www.softintegration.com.
2 Run Your Program
2.1 Run from ChIDE in Windows
Run your program based on the instruction available under ChIDE Help menu of ChIDE.
ChIDE is distributed along with Ch 6.0 Professional or Student Edition. It is also available
at http://www.softintegration.com/docs/ch/chide/
2.2 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
pf3
pf4
pf5

Partial preview of the text

Download Submitting Computer Homework: A Step-by-Step Guide by Harry H. Cheng - Prof. Harry H. Chen and more Assignments Software Engineering in PDF only on Docsity!

Submitting Computer Homework

Harry H. Cheng, Professor

March 27, 2008

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 ChIDE, ChSciTE, or a text editor such as Notepad to open your programs and print them.

1 Download a C/C++ Interpreter

Download the C/C++ interpreter Ch Student Edition from http://www.softintegration.com.

2 Run Your Program

2.1 Run from ChIDE in Windows

Run your program based on the instruction available under ChIDE Help menu of ChIDE. ChIDE is distributed along with Ch 6.0 Professional or Student Edition. It is also available at http://www.softintegration.com/docs/ch/chide/

2.2 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.

2.3 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.

2.4 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.
  3. Clear the screen by typing command clear
  4. 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.

  1. Open Notepad or any other text editor to open the output.txt, then print it out.

3 Obtain a Screen Shot

3.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.

plot.outputType(PLOT_OUTPUTTYPE, "postscript eps", "filename.ps"); plot.outputType(PLOT_OUTPUTTYPE, "png", "filename.png");

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

4.2 Print a Plot in Linux or Mac

One of the following methods can be used to print out a plot in Linux or Mac.

  1. Use GIMP to grab the image and print it out.
  2. Within your Ch program related to plotting, use plotting member function to generate a plot in postscript file, say filename.ps or PNG file, as shown below.

plot.outputType(PLOT_OUTPUTTYPE, "postscript eps", "filename.ps"); plot.outputType(PLOT_OUTPUTTYPE, "png", "filename.png");

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.

5 Print Multiple Pages in a Single Sheet for a PDF

File

The method to print multiple pages in a single sheet for a PDF file is printer dependent. Below are two different methods for two different printer setup. You may give it a try to see which one works for you.

5.1 Method One

In "File" menu Click "Print" Click "Properties" Click "Finishing" Then you can choose how many pages per sheet under "Pages per Sheet"

5.2 Method Two

File --> Print Under the "Page Handling" section choose "multiple pages per sheet" from the "page scaling" drop down menu Then you can choose how many pages per sheet, landscape or portrait, etc.