NAME |
Circle your lab section |
Section 8, Thurs 6:30PM. |
Section 3, Thurs 8:30AM. |
Section 9, Fri 2:00PM. |
|
EMAIL ID |
Section 4, Thurs10:30AM |
Section 10, Thurs 8:30PM. |
Section 5, Thurs 12:30PM. |
Section 11, Fri at Noon. |
|
STUDENT ID |
Section 6, Thurs 2:30PM. |
Section 12, Fri 4:00PM. |
Section 7, Thurs 4:30PM. |
Section 13, Fri 10:AM |
GRADING CRITERIA |
POINTS |
SCORE |
Initial program comments identify, student ID, email, lab section number |
10 |
|
Program submitted electronically under flow.cpp |
20 |
|
Program compiles without serious warning messages, e.g., ones that indicate program incorrectness | 20 | |
Function main() has appropriate and meaningful comments describing its various tasks as they occur | 10 | |
Program has appropriate and consistent indentation and operator spacing | 10 | |
Blank lines are use to separate unrelated paragraphs/blocks of code | 5 | |
Named constant consistently used for target flow rate |
5 |
|
Named constant consistently used for channel width |
5 |
|
Named constant consistently used for channel slope |
5 |
|
Named constant consistently used for roughness coefficient |
5 |
|
Program prints a suitable title or legend |
10 |
|
Prompts the user with an appropriate message to guess the channel depth |
5 |
|
If user provides a guess outside the proper range, an error message prompts the user for a legitimate guess |
10 |
|
If the user inputs no guess (i.e., program encounters end-of-file), the program exits |
10 |
|
Program computes the calculated flow using the correct mathematical formulas for Q and R |
20 |
|
Program labels and prints the guessed depth, computed flow, target flow, absolute value of the difference between computed and target flows, and the percentage error between computed and target flows |
20 |
|
Program logic repeats when target and computed flows differ by more than 0.1% | 10 | |
When computed and target flows agree within 0.1%, program prints a final message announcing the depth and flow, then exits normally. | 10 | |
Program computes R2/3 using the pow() function and S1/2 using the sqrt() function |
10 |
|
TOTAL |
200 |
|
Extra Credit: Programs contains an extra and correct function that is helpful to the assigned task |
10 |
|
TOTAL |
200 |
|