CPSC 231: BONUS ASSIGNMENT
(Due Friday June 27: Worth 2%)
Assignment description
You are to write a program that
will prompt the user to enter in a non-negative integer. The program will
determine the number of digits that the number consists of through a series of
recursive function calls. For example, if
the person entered in "123" then the program would determine that this
number consists of three digits and display the original number as well as the
number of digits that it's composed of back to the user (see the "Required Test
Cases" section below). The program will make this determination
through a recursive function (not a procedure):
function checkDigits (..): integer;
begin
checkDigits := (* Number of digits in the number*)
end;
Assignment grading
Because this is a bonus assignment which can
bring your grade higher than just the maximum grade for assignment component
marking will be far tougher. Most assignments will tend to fully fulfill
all requirements or else it will have totally missed everything.
Consequently your submission will likely fall into one of three grade
categories.
D- version (0.7 GPA for the assignment))
The student has invested a considerable effort in the assignment, but the
program does not compile.
D version (1.0 GPA for the assignment)
The student has invested a considerable effort in the assignment, the program
compiles but does it not fulfill any of the requirements listed in the
assignment specification.
A version (4.0 GPA for the assignment)
Fulfills all of the requirements listed in the assignment description as
well as fulfilling all the other assignment requirements.
New Concepts to be applied for the assignment
Other submission requirements
-
Good coding style and documentation:
They will play a role in determining your
final grade for this assignment. Your grade can be reduced by a letter step
e.g., "A" to "A-" for poor programming style.
- Submitting your assignment: Run a script and within that script
clearly demonstrating all the features that you have implemented (refer to
part of the handout that dealt with the running of typescripts in the
original assignment submission guidelines).
Required test cases:
You must
run the following test cases in order to receive credit for your assignment:
User input: