Computer Science Homework Solutions
Problem
#127731

Performing Calculations on Rows and Columns of an Array

Create an application that either sums or averages the rows or columns of a two-dimensional array depending on user choices. Use the following data for the array:

5    7    3    9    12
4    8    9    13   4
0   -1   -7   13   8
4    4    4    4    0

Create a menu bar with a File menu that includes a Perform Action command
and an Exit command. The Perform Action command computes either the sum
or the average of the rows or columns in the array and displays the result in a message box. The Exit command exits the application. Create a second menu on the menu bar called the Action menu. Add a Sum Rows command, Sum Columns command, Average Rows command, and Average Columns command to the Action menu. Use the RadioCheck and Check properties of each command to allow the user to select a command on the Action menu. The Perform Action command checks to see which command is selected on the Action menu to determine which operation to execute when the user clicks the Perform Action command. Note that the commands on the Action menu do not require any event procedures. Include appropriate shortcut keys for all commands. After the Perform Action command executes, the program should display the results in a message box. The message box should display results for each row or column separated by a ControlChars.NewLine character. The message box also should ask the user if he or she wants to continue or to exit the application.


Solution Summary

An application is created to perform calculations on rows and columns of an array.

Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$3.99)
Included in Download
  • Plain text response
  • Attached file(s):
    • array_sum.zip
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
Browse