Lecture notes for the Introduction to Computer Science I by James Tam | Return to the course web page |
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 |
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 |
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.