Lecture notes for the Introduction to Computer Science I by James Tam Return to the course web page

CPSC 231: Assignment 3 (Worth 1%)

Grade out of 16 Letter
16 A
15 A-
14 B+
13 B
12 B-
11 C+
10 C
  9 C-
  8 D+
  7 D
  6 D-
  Below 6 marks F

Part 1: Fixing a non-compilable program (8 marks)

In the Assignment 3 directory (under /home/231/tamj/assignments/assignment3) you will find a Pascal program in a UNIX text file called "broken.p".  Rename the file to "fixed.p", and change the name of the program (in the header) to "fixed".   Then make the three edits in the program so that it will compile.  Aside from making the minimal amount of 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 fixing the one that was provided).

Eight marks will be given for a program that will compile and is renamed properly.  One mark will be given for renaming the UNIX file and one mark will be given for changing the name in the header.  Two marks will be given for each edit that fixes a syntax error (max of 6 marks for making all 3 edits).

New concepts to be applied:

Getting familiar with some of the more common syntax errors that prevent program a program from compiling.  The ultimate goal is to be able to produce a program completely free of these errors. 

 

Part 2: Simple text formatting (8 marks)

In the Assignment 3 directory (under /home/231/tamj/assignments/assignment3) you will find a Pascal program called 'converter.p'.  You are to change this program so that the output matches the output of the executable program called "converter".    What you need to do:

New concepts to be applied:

Producing simple formatted output in Pascal.

 

Submission requirements

In addition to having fulfill the generic assignment requirements, the requirements specific to this assignment include:

  1. Include a README file in your submission:  For this assignment your README file must include your contact information: your name, university identification number and UNIX login name so that your marker knows whose assignment that he or she is marking.  Omitting the necessary information from this file will result in the loss of a letter 'step' (assuming that the marker can actually figure out who the assignment belongs to).

  2. Assignments (source code/'dot-p' file and the README file) must be electronically submitted.  In addition a paper print out of the source code and README must be handed into the assignment drop box (located on the second floor of the Math Sciences building) for the tutorial that you are registered in.  Electronically submitting the assignment allows your marker to run the code in order to quickly determine what features were implemented.  Providing a paper printout makes it easier for your marker to read and flip through your source code.  Unless you are told otherwise you are to email your source code and readme file to your TA and to me.  Make sure that include the following information in the subject line: "CPSC 231 Assignment X" where 'X' stands for the assignment number that you are submitting e.g., for this assignment your subject line should say "CPSC 231 Assignment 3".

  3. As a reminder, you are not allowed to work in groups for this class.   Copying the work of another student will be regarded as academic misconduct (cheating).  For additional details about what is and is not okay for this class please refer to the following link.

To help make sure that you haven't missed anything here is a checklist of items to be used in marking.