User Tools

Site Tools


Phys2660 Homework Page

The class reading assignments are part of each week's homework, these should be completed before class each Tuesday. If you didn't complete a Lab in your Thursday session, you should complete it on your own to prepare for the week's homework problems. Lab solutions will be available for you to study after the Thursday Lab meetings.

Always check the reading assignments page to prepare for the upcoming week's topics.

Also see the examples page for some example pieces of code.


All homework assignments are due on-line by noon on Thursdays.
Printouts are due at the beginning of your Lab Section.
Due Date assignment solutions Avg. Grade
2-Feb homework 01 solutions
9-Feb No assignment
16-Feb homework 02 solutions
23-Feb homework 03 solutions
2-Mar homework 04 solutions
18-Mar homework 05 solutions note Saturday 18 Mar due date
25-Mar homework 06 solutions note Saturday 25 Mar due date
6-Apr homework 07 solutions note Thursday 6 Apr due date
15-Apr homework 08 solutions extended to Saturday 15 April 11:59pm
21-Apr homework 09 solutions note Friday 21 Apr due date, 11:59pm
29-Apr homework 10 solutions note Saturday 29 Apr due date, 11:59pm
29-Apr homework 11 solutions note Saturday 29 Apr due date, 11:59pm
3-May homework 12 note Thursday 4 May due date, 11:59pm
3-May homework 13 note Wednesday 3 May due date, 11:59pm
11-May final exam

General comments on Homework

 Coding Flowchart

  • Occasionally we will need you to print a copy of your source code and turn this in at your lab session. Sign your code to pledge that this is your work. We are going to try to do without hard copies this semester, but there will be occasions when they may/will be necessary. Follow the weekly instructions carefully.
  • Start your homework early. At least read over the problems early.
  • Don't start coding a problem until you have a good understanding of how to approach it. Otherwise you may write a different program than the expected one and this may add a lot of extra work.
  • Questions? See your TA/Instructor, and use the discussion group.
  • You may (and are encouraged to) discuss the programs (strategies, coding problems, etc) with your classmates, but you may not share/copy code solutions.
  • Your submitted source will be used for grading comments, which will be returned to you electronically.
  • You will pledge the electronic copy, and this pledge signifies that you are the sole author of the assigned source code. See the example below for the required comment heading to be included in your program files.
//// Example Program Header
// Name:   Chris Neu
// UserId: ccn4g
// Homework #: 1
// Problem #: 4b
// Program Name: ccn4g_program.cpp
// Pledge Signature: <write out the pledge here>

Submitting your Homework Online

The names for your programs are shown in []'s in the homework assignments. The names of all the files you submit must begin with “userID_”. Substitute your userID in the file names. In the homework descriptions, the programs/files printed in bold must be submitted for grading. If your programs are not named properly, they may not be collected for grading. Use the following program to submit your homework: p2660_hw userID_program
Note: In the first prelab exercise you will modify your .login file to enable this command. Otherwise it will not be defined for your use.

For example, if your userID is 'ccn4g', you would submit your completed homework file for grading by executing the following command:

p2660_hw ccn4g_program.cpp

With this program you can submit one file at a time for grading. You must submit your files before each week's deadline – the program will not accept late submissions. You may resubmit (and thus overwrite) your homework as many times as you choose up until the cutoff time. Late homeworks will not be accepted.

Printing your Homework

You may want to transfer your work to your local computer or send them to UVa Webmail for printing. Instructions are provided below. Additional instructions for printing files directly from your galileo account on the printer in the Physics Library are available on the FAQ Page.

(1)Send files to your UVa Webmail using sendme

After setting up your galileo account for PHYS2660 in the first PreLab you will have access to a command called sendme. You can use sendme to email one or more files to your regular UVa email account. This command will work with any file type. Below are some examples with comments:

sendme myprogram.cpp                 # emails myprogram.cpp to your
sendme myprogram.cpp myprogram.hpp   # ditto, but also emails program.hpp
sendme *.cpp                         # emails all .cpp files in my current directory
sendme plot.pdf output.dat           # ...

(2)Copy files directly to your computer from galileo

Alternatively, if you have one of the programs installed that supports secure shell and file copy (ssh and scp) (Software page), you can use that to copy a file to your local PC for printing.

And for the “home brewers” out there:

(3)Emailing text-only files (no graphics or binary data)

A standard way to email a text file (named 'example.txt') uses the mail program as follows:

/bin/mail < example.txt

(4)Email attachments (send any type of file)

Type pine to start the pine email program. The first time you run pine it displays a welcome message, just type e to exit. To send a file as an attachment type c for compose. Next type the email address in the To: line. Then use the arrow keys to move your cursor to the Attachment line. Type control-j (^j) to add an attachment. Then type control-t (^t), this will bring up a file browser. Use the arrow keys to find the file you want to attach and press RETURN. Enter a title for the attachment if you wish, or just hit RETURN again. Press control-x (^x) to send the file. Using attachments you can send text, binary program files, graphics files, etc.

Homework Grading Guidelines

Some general guidelines are below. Rubrics for each assignment will be provided as well.

  1. Compiling without errors, runs OK, reasonable results: ~25%
  2. If the result is exactly as expected ( no calculation errors, etc. ), the structure/output of the code is clear, and good programming habits are used, then we award the other ~75%. Conversely poor structure/clarity, output preparation, programming habits, will count against this 75%. The output from your programs should be easily readable and descriptive. Make sure your design satisfies any explicit requirements on program structure. Use descriptive variable names in your code. Include comments in key areas of your code as necessary to explain your work. Refer to the style guide for some tips to make your code more readable.
  3. Avoid compiler warnings: approximately -10% per question, per type of warning message (unused variables, type mismatch, etc…), with a max of three warning penalties. On a 10-point homework question, that means every warning is -1 point, up to -3 total.
hw/hw_start.txt · Last modified: 2017/05/02 22:02 by neu