From: Software Engineering Manager
To: Student Programmer
Subject: Correlation program guidelines
I saw the memo from quality control and thought you might like some advice.
1) There are two things that make this program a little bit tricky: the bizarre API and the need for graphics. Address them one at a time.
2) Begin by understanding the API. The header file mentioned in the memo is online in the course web page. I am working on getting the corresponding library module for you. Read the header file and I will try to answer any questions you have in our meeting Thursday morning.
3) Once you understand the API it should be easy to write a loop like the input-failure loops in chapter 4 to read the sample pairs into arrays. They never produce more than 100 parts in a batch, so you can pre-allocate an array that big.
4) Then you will have to compute the correlation coefficient from the two arrays and print it out. You can start coding that early if you like: just use the array initialization syntax to build test data into your program.
5) Meanwhile, Use Microsoft Excel to do the graphics thing. Begin by setting up a two-column table of numbers and producing a scatter plot from them.
6) Then, export the table as a CSV (Comma-Separated Variable) file and look at the result. If you have your program write the input values to a text file in that format you should be able to read it into Excel and generate a plot from it.
Let me know if there are any problems. The deadline for this will be discussed in our meeting Tuesday morning (and the result posted to the class web page.)