Item #s |
Max Deducted |
required elements |
Problem |
1 |
omitted -5 |
arrays |
|
2 |
omitted -5 |
do loops |
wrong
form -2 DO
<label><variable>=<start>,<endValue>
[,<modification- value>] … <label>
CONTINUE |
3 |
omitted -5 |
end = |
in a read statement - where to go upon detection of end of
input data READ
(<unitNumber>,<label1>, END= <label2>) |
4 |
omitted -5 |
err = |
in a read statement - where to go upon detection of
erroneous input data READ
(<unitNumber>,<label1>, ERR = <label2>) |
5 |
omitted -5 |
formatted reads |
wrong
form - used
READ (5,*) |
6 |
omitted -5 |
formatted writes |
wrong
form -1 each -2 missing carriage control -1 using A format |
7 |
omitted -5 |
arithmetic if |
IF (<variable>) <label1>, <label2>,
<label3> goes to <label1> if value of <variable> < 0 goes to <label2> if value of <variable> = 0 goes to <label3> if value of <variable> > 0 |
8 |
omitted -5 |
computed goto |
GOTO (<label1>, <label2>, <label3>, …
<labelN>) <variable> transfer control to <label1> if <variable> = 1 transfer control to <label2> if <variable> = 2 transfer control to <label3> if <variable> = 3 … transfer control to <labelN> if <variable> = N |
9 |
omitted -5 |
subroutines |
SUBROUTINE <name> (<parameter-list>) …. RETURN END |
10 |
omitted -5 |
functions |
[<returnValueType>]
FUNCTION <name> (<parameter-list>) … <name> =
<expression> RETURN END |
11 |
omitted -5 |
if |
wrong
form -2 -
early FORTRAN did not allow use of THEN or ELSE. Only one statement was allowed if the condition in the IF was
true. IF (<condition>) doThis doThis could be an assignment statement, an input statement, an
output statement, a subroutine call, or a goto statement. If the <condition> was false,
control passed to the statement following the IF. If the doThis was anything but a goto, after the doThis was
executed, control passed to the statement following the IF. |
12 |
-8 |
8 item heading |
incomplete -1 each |
13 |
omitted -5 |
description of purpose |
incomplete -2
wrong -3 description of program's purpose is required in
every program this semester |
14 |
omitted -5 |
description of input |
incomplete -2
wrong -3 description of program's input is required in
every program this semester |
15 |
omitted -5 |
description of output |
incomplete -2
wrong -3 description of program's output is required in
every program this semester |
16 |
-8 |
internal comments |
inadequate - in this course
should mainly be about the programming language (what is different from what
you know in Java or other languages and how the statement behaves if it
wouldn't be obvious to someone unfamiliar with the language). should also include explanations of
behavior (algorithm) which are not obvious |
|
|
Penalties for |
|
17 |
|
exe doesn't
run |
|
18 |
|
exe not
present |
|
19 |
-5 if 1
per line |
output doesn't
match specs |
format 3
per line - explicit requirement |
20 |
|
output doesn't
match specs |
missing
item(s) - number of positive numbers, number of
negative numbers, number of incorrect input values, number of input values of
zero, echo of input, contents of
array of positive values, contents of array of negative values, average of positive values, average of
negative values |
21 |
|
output isn't
correct |
incorrect
values |
22 |
|
output isn't
complete |
missing
item you say you will output something that isn't in
output |
23 |
|
no output |
|
24 |
|
disk not
labeled |
course requirement that disks submitted as part of
programming assignments be labeled at least with programmer's name |
25 |
|
folder not
labeled |
course requirement that programming assignments be
submitted in a labeled folder |
26 |
|
printout
missing |
course requirement that printout of source code be
submitted with programming assignments |
27 |
|
error message
missing |
When the program encounters erroneous input it should
inform the user of the problem when the program is interactive. |
28 |
|
output format
inadequate |
***** 1
or more times -1 each - occurs when
width in format descriptor is not big enough to hold the integer portion of
the value being printed |
29 |
|
intro doesn't
match specs |
Introduction to user should tell the user what the program
will do and should match the specifications and should do what it says. |
30 |
|
actual/formal
parameter names identical |
This is not a good idea and should not be done in this
course. In general the correspondance
between formal and actual parameter names is by position. Using the same names makes it look like it
is by name. |
31 |
- ½
each |
unnecessary
type declarations |
FORTRAN uses the convention that variable names beginning
with the letters I,J,K,L,M,N that
hold numeric values by default hold integer values. All others hold REAL values. |
32 |
-1
each |
unnecessary
statements |
|
33 |
-1
each |
unreachable
statements |
you have a statement in your code that can never be
executed (probably because it is directly preceded by a GOTO and doesn't have
a label on it). |
34 |
-1
each |
missing return
statement |
subroutines and functions required a RETURN statement in
early FORTRAN |
35 |
-1
each |
missing stop
statement |
main program required a STOP statement in early FORTRAN |
36 |
-1
each |
missing end
statement |
END marks the end of a program unit (tells the compiler
that there is no more code in that unit to be translated) |
37 |
-2 |
intro incomplete |
|
38 |
-3 |
disk missing |
|
39 |
-1 |
output not right
justified |
|
40 |
-3
each |
average not visible |
pos or
neg - was an explicit specification |
41 |
|
averages should be real |
this is a good thing to remember |
42 |
|
exceeding array bounds |
early FORTRAN would let you ask for the 12th value in a
10th element array. Your
code should not do this |
43 |
|
error message unclear |
It is n't clear from what you output when erroneous input data was
encountered what the user did wrong |
44 |
-1 each |
extra output |
your program printed values that were not in the input data |
45 |
-5 |
no intro |
|
46 |
- ½ each |
unnecessary
initialization |
it is not necessary or desirable to initialize all variables
although some employers will ask you to do this. |
47 |
|
using non-FORTRAN IV
feature |
|