CPSC 231: Assignment 3 (Due Thursday May 29: Worth 2%)

Grade out of 17

Letter
17 A+
16 A
15 A-
14 B+
13 B
12 B-
11 C+
10 C
  9 C-
  8 D+
  7 D
  6 D-
Less than 6 F
 

Make sure that you follow all the assignment specifications that were listed in the handout I gave you in class (it can also be found online under the url: http://pages.cpsc.ucalgary.ca/~tamj/231/assignments/specifications.html) especially point 3!

Part 1: Fixing a broken program (8 marks)

In the assignment 3 directory (under /home/231/assignments/assignment3) you will find a Pascal program called "broken" in a Unix text file called "broken.p".  Rename the name of the file to "fixed.p" and the rename the program to "fixed".  Then fix the four syntax errors in the program so that it will compile and produce the same output as the executable called "fixed".   Aside from making changes that will allow the program to compile you cannot otherwise change the program (i.e., you can't just simply write your own Pascal program instead of using the one that was provided).

Part 2: Simple text formatting (9 marks)

In the assignment 3 directory (under /home/231/assignments/assignment3) you will find a Pascal program called "formatting.p".   Change the name of the file to "formattingSolution.p" and the name of the program of the "formattingSolution".  Also you are to modify the program so that the output matches the output of the executable program called "formattingSolution".  The specific changes required include:

You can assume that gross income will range from $0 to $999999.99.

New Concepts to be applied for the assignment