EE-222留学生讲解、辅导data file、讲解Java,c/c++编程语言
- 首页 >> 其他 Times Table Character – EE-222 (1191-4538) INTERMEDIATE ...
https://bblearn.nau.edu/webapps/blackboard/content/listContent.jsp?course_id=_172982_1&content_id=_7398131_1 1/2
H Course Content Times Table Character
Times Table Character
Times Table Character
The first function with signature void write_tt(void); doesn't produce any output but
computes a 10x10 times table and writes it into a data file. The data file name is provided
by way of a symbolic constant DATA_FILE. This symbolic constant is also supposed to be
used by the other two functions.
The second function with signature void read_tt(void); reads the times table from the file
and outputs the whole table in a nicely formatted form on the standard output like this (the
overhead line is unintentional):
The third function with signature int result_tt(int x, int y); takes two parameters that are
considered to be two factors, each in the range of 1-10 (although validity of input doesn't
need to be checked) and returns the product of the two factors by directly looking up the
result in the times table.
What to submit
All three code files
A screen shot of a run of your driver, having it show the result of 4*5.
Hints
Grading guide
This is an individual programming exercise, so I expect you to work on this problem by
yourself. All homework problems are individual assignments.
What to do
Write three C functions that do simple operations on a 10x10 times table in the following way:
Put all three functions into a file called tt.c. Also write a corresponding header file (convince
yourself to call it tt.h) that has the symbolic constant for the file name and the function prototype
declarations. Finally, write a file main.c that contains the driver, which will call all three functions in
the order as described above. Make sure to handle the reading of the input parameters and the
printing out of the result in your main() function, that in turn will be using the third function.
I ask you to submit, here on BBLearn, on or before the due date:
Make sure to fully honor the function descriptions as outlined above. Your function prototypes
need to look exactly like what you see above and they also need to produce the exact same
results as described above. For example, I do not ask for the file name to be handed in as an
argument to any of the functions. While this may be a desirable and reasonable feature, I also
want you to live up to specifications given to you.
My Bb Learn NAU Support Content Collection Course Evaluations
Bo Sun 742019/2/25 Times Table Character – EE-222 (1191-4538) INTERMEDIATE ...
https://bblearn.nau.edu/webapps/blackboard/content/listContent.jsp?course_id=_172982_1&content_id=_7398131_1 2/2
Your submission will not earn points if it doesn't properly compile.
Your submission will not earn points if any part of the above items is missing.
You receive 15 points for proper and abundant commenting, naming conventions of
variables and indentation (5 points for each aspect).
You receive 15 points for the correct coding of the function write_tt().
You receive 15 points for the correct coding of the function read_tt().
You receive 15 points for the correct coding of the function result_tt().
You receive 15 points for the coding of the function main(), which correctly call all the other
three functions.
You receive 10 points for the correct splitting of your code into units that comply with best
programming practice as indicated above.
You receive 5 points for the correct coding/usage of the symbolic constant that represents
the file name.
https://bblearn.nau.edu/webapps/blackboard/content/listContent.jsp?course_id=_172982_1&content_id=_7398131_1 1/2
H Course Content Times Table Character
Times Table Character
Times Table Character
The first function with signature void write_tt(void); doesn't produce any output but
computes a 10x10 times table and writes it into a data file. The data file name is provided
by way of a symbolic constant DATA_FILE. This symbolic constant is also supposed to be
used by the other two functions.
The second function with signature void read_tt(void); reads the times table from the file
and outputs the whole table in a nicely formatted form on the standard output like this (the
overhead line is unintentional):
The third function with signature int result_tt(int x, int y); takes two parameters that are
considered to be two factors, each in the range of 1-10 (although validity of input doesn't
need to be checked) and returns the product of the two factors by directly looking up the
result in the times table.
What to submit
All three code files
A screen shot of a run of your driver, having it show the result of 4*5.
Hints
Grading guide
This is an individual programming exercise, so I expect you to work on this problem by
yourself. All homework problems are individual assignments.
What to do
Write three C functions that do simple operations on a 10x10 times table in the following way:
Put all three functions into a file called tt.c. Also write a corresponding header file (convince
yourself to call it tt.h) that has the symbolic constant for the file name and the function prototype
declarations. Finally, write a file main.c that contains the driver, which will call all three functions in
the order as described above. Make sure to handle the reading of the input parameters and the
printing out of the result in your main() function, that in turn will be using the third function.
I ask you to submit, here on BBLearn, on or before the due date:
Make sure to fully honor the function descriptions as outlined above. Your function prototypes
need to look exactly like what you see above and they also need to produce the exact same
results as described above. For example, I do not ask for the file name to be handed in as an
argument to any of the functions. While this may be a desirable and reasonable feature, I also
want you to live up to specifications given to you.
My Bb Learn NAU Support Content Collection Course Evaluations
Bo Sun 742019/2/25 Times Table Character – EE-222 (1191-4538) INTERMEDIATE ...
https://bblearn.nau.edu/webapps/blackboard/content/listContent.jsp?course_id=_172982_1&content_id=_7398131_1 2/2
Your submission will not earn points if it doesn't properly compile.
Your submission will not earn points if any part of the above items is missing.
You receive 15 points for proper and abundant commenting, naming conventions of
variables and indentation (5 points for each aspect).
You receive 15 points for the correct coding of the function write_tt().
You receive 15 points for the correct coding of the function read_tt().
You receive 15 points for the correct coding of the function result_tt().
You receive 15 points for the coding of the function main(), which correctly call all the other
three functions.
You receive 10 points for the correct splitting of your code into units that comply with best
programming practice as indicated above.
You receive 5 points for the correct coding/usage of the symbolic constant that represents
the file name.