CSCI 1320
Homework Seven
Fall 2009
For
this homework laboratory assignment we will attempt to study about text files,
arrays and recursion.
Assume
a datafile contains an unknown number of integers. We
must perform the following tasks:
1.
Read the datafile and fill an array with the values,
returning the number of numbers read.
2.
Study the array
a.
find the index of the largest element in the array
b.
find the index of the smallest element in the array
c.
find the sum of the elements in the array
d.
find the average of the elements in the array
3.
Write the results of the study to an output file.
In
each case, we will prompt the user for the names of the files in question. Of
course, we must use appropriate functional decomposition for the solution.
Note
that on your description pages, you must use the following format:
Description:
<fill in
description of exercise here>
Inputs:
< what does the
program expect as input>
Outputs:
< what does the
program produce>
Programming tools and techniques:
<list program
tools and techniques used in the solution>
As
always, your laboratory report must include
title page
description (see above)
source code with appropriate internal documentation
sample execution
story