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

CPSC 231: Assignment 5 (Worth 3%)

Grading Scales

Grade out of 20 Letter
19 - 20 A
17 - 18 A-
15 - 16 B+
13 - 14 B
11 - 12 B-
9 - 10 C+
7 - 8 C
5 - 6 C-
2 - 4 D+
Program compiles, no features were implemented but considerable effort was put into the submission D
Program doesn't compile, but considerable effort was put into the submission D-
Program doesn't compile, only a nominal effort was put into the assignment F

 

New concepts to be applied for this assignment

 

Assignment description

All the features of this assignment are identical to the previous assignment except that you must break these features down into the following modules (functions and procedures)

Module Type Input Function return value Description Marks for implementing the module
main procedure NA NA The starting point of execution for the program NA - it will be given to you to help you start your program.
displayIntroduction procedure none NA Describe how the program works.  The procedure runs once as the program first runs. 1 mark
getYear function integer (year) integer (year) Prompt the user to enter their year of birth, store the value entered and return this value back to the calling procedure (the main procedure). 4 marks
belowMinYear function year boolean Checks if the birth year is below the min allowable value for the program.   If so it returns true, otherwise it returns false. 2 marks
aboveMaxYear function year boolean Checks if the birth year is above the max allowable value for the program.  If so it returns true, otherwise it returns false. 2 marks
generateZodiacAnimal procedure year NA Determines and display the zodiac animal for any given year within the allowable range that it can handle. 6 marks (2 marks if a series of compound if constructs or a case was used, 1 mark if the program only works for one twelve year cycle)
promptRerun procedure char (rerunAnswer) NA Asks the user if they wish to rerun the program and generate the zodiac animal for another year. 4 marks
displayConclusion procedure none NA Displays a signoff message that indicates to the user the program will end. 1 mark

 

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.  For this assignment you should also list the features/modules that you implemented.

  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., "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.  A sample executable 'zodiac' can be found in UNIX under the directory: /home/231/tamj/assignments/assignment5.