This week's project is to write two utility subprograms for array processing in each of our four languages. More precisely, for each of our four languages, write:
#include <iostream.h>
void printArray(double anArray[], int itsSize, ostream & out = cout)
{
for (int i = 0; i < itsSize; i++) {
out << anArray[i] << endl;
}
}
Similarly, a C++ function to fill an array of doubles
might be implemented as follows:
void readArray(double anArray[], int itsSize, istream & in = cin)
{
for (int i = 0; i < itsSize; i++) {
in >> anArray[i];
}
}
Your project is to implement the equivalent subprograms and a main "driver" program to demonstrate them in Ada, Clojure, Java, and Ruby. Your driver should
Turn in. Create project script files showing correct
compilation (when appropriate) and execution of each language.
Then use cat to create a single file that contains all of
your source code, compilation and results:
cat projScript.java projScript.ada projScript.clojure projScript.ruby > proj07-resultsThen submit your project by copying that single file into your personal folder in /home/cs/214/current/:
cp proj07-results /home/cs/214/current/yourUserName
replacing yourUserName with your login name.
The grader will access and grade your project results from there,
using the criteria from
this grade sheet.
Calvin > CS > 214 > Projects > 07