Pascal Program #1  - Re-write of FORTRAN (1,2,or 3) in Pascal

 

Points off

Problem #

Description

-5

1.   

fails to warn about maxint

-5

2.  

fails to prompt for data

-1 each

3.  

spelling error or wrong word error or grammar error

-5

4.  

missing purpose

-5

5.  

missing input description

-5

6.  

missing output description

-5

7.  

missing intro to user

 

8.  

very nice comments about language   +5 bonus

-5

9.  

tells how to end instead of using eof or eoln (see #24) 

-5

10.     

computes area using ending data (says that entering 0 or a negative number for one of the values will end the program but then goes and computes an area using the values)

-5

11.      

failing to echo input

-5

12.     

not nicely formatted (i.e. in exponential form)  - we formatted our output in FORTRAN and need to be able to do it in other languages

-5

13.     

output not labeled  visible at runtime

-5

14.     

your program could use a few words explaining your algorithm

-1 each

15.     

missing an item from the heading

-2

16.     

incomplete or inaccurate description of purpose - is a description of what the program is supposed to do (i.e. find the area of an unspecified number of trapezoids where the user enters the lengths of the bases and the height for each one  OR  sorts three integers input by the user into descending order.

-2

17.     

incomplete or inaccurate input description  - (e.g. input is three real numbers on a single line  representing the bases and the height for each of the trapezoids the program is to find the area of  or  thee integers on a single line representing the numbers to be sorted.

-2

18.     

incomplete or inaccurate output description includes an introduction to the user telling what the program will do; prompts for desired input data;  echo of input data with labels; labeled output of the results

-2

19.     

incomplete or inaccurate intro

-5

20.    

no comments about language - for each language, explanations of what the particular language statement or construct is doing and/or how it differs from what a previous language required

-2

21.     

not enough comments about language

-3

22.    

"why did you" comments from me

-2 each

23.    

using global variables - some languages (i.e. Pascal) allow the programmer to use global variables.  It is considered bad programming practice to be avoided.

-5 each

24.    

you added a requirement which is not part of the specification

(e.g. required integers when the original programming specification said the program expected real numbers  OR  handling a single data set when the specifications didn't say that only 1 data set was to be processed.

-3

25.    

you have an erroneous statement

-10

26.    

no executable on disk

-20

27.    

program doesn’t compile

 

28.    

runtime error

-1 each

29.    

inaccurate comment about language or code

-5

30.    

missing (input, output) in header - standard Pascal requires that you include input whenever there is keyboard input and output  whenever there is output to the screen in your program. 

-5

31.     

improper use of Boolean variable in a test condition (e.g.  while (booleanVar = false) do  instead of  while (not booleanVar) do

-2

32.    

prompt to user is incomplete