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



Download 26.7 Kb.
Date10.06.2017
Size26.7 Kb.
#20262
Pascal Program #1 - Re-write of FORTRAN (1,2,or 3) in Pascal


Points off

Problem #

Description

-5



fails to warn about maxint

-5



fails to prompt for data

-1 each



spelling error or wrong word error or grammar error

-5



missing purpose

-5



missing input description

-5



missing output description

-5



missing intro to user






very nice comments about language +5 bonus

-5



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

-5



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



failing to echo input

-5



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



output not labeled visible at runtime

-5



your program could use a few words explaining your algorithm

-1 each



missing an item from the heading

-2



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



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



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



incomplete or inaccurate intro

-5



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



not enough comments about language

-3



"why did you" comments from me

-2 each



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



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



you have an erroneous statement

-10



no executable on disk

-20



program doesn’t compile






runtime error

-1 each



inaccurate comment about language or code

-5



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



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

-2



prompt to user is incomplete


Download 26.7 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page