Reverse the contents of an array

This assignment tests your ability to load a sequential file into an array then process it.

Write a program to display an array either forward or in reverse order.

There are many ways to do this program. I did it by writing a FormLoad event handler that read the file into an array, then wrote ButtonClick event handlers that displayed the contents of that array in forward and reverse order.

Another possibility is for the FormLoad event handler to create two arrays, one in forward order, the other in reverse order. Then the ButtonClick event handlers could display the appropriate array.

It could also be done without arrays, by building up a long string that contained the entire file, then displaying that string. This approach could be modified to create two long strings, one in forward order the other reversed.

For practice, you could do each of these, but at least do the one I did. When it is working, turn in a screen shot and listing.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.