Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Vertical Additive Symmetric Matrix Matrixes A Matrix is a 2 - dimensional array represented as a row x column data structure. Vertical Additive Symmetric Matrix

Vertical Additive Symmetric Matrix
Matrixes
A Matrix is a 2-dimensional array represented as a row x column data structure. Vertical Additive Symmetric Matrix
A matrix of integer numbers is defined to exhibit vertical additive symmetry if the sum of the numbers in the columns of the matrix exhibits vertical symmetry ... if the total sum for the columns is the same. In a list with an odd number of columns, the middle column is considered symmetric with itself.
Examples:
Vertical Additive Symmetric Matrixes Not Vertical Additive Symmetric Matrixes ||
25637128301
------12|12|---------|
17|111210|10133|-14
----|----620|206
|-------||-------------------|
35637128301
------13|12|---- X----|
27|111210|10133|-14
----|----720|206
|---|---||--------X----------|
Your program must read a file of candidate matrixes that are specified in the file the following way:
The first file row contains 2 space delimited numbers for the number of rows and
columns in the matrix that follows.
The matrix that follows consists of numbers in the form of multiple lines of space delimited
numbers. Each number can be at most 4 digits long.
In this project, no input candidate matrix should have more than 20 rows and columns.
The file name to be read is to be matrixes.txt.
You must create a a matixes.txt file that must contain at least 10 candidate matrixes. 6 of
the matrixes must be vertical additive symmetry matrixes and 4 matrixes must not have vertical additive symmetry.
You are only responsible for checking the following regarding the input file:
If the file open fails
Correctly detecting the end of the file
o Theprogramshouldoperatecorrectlyevenifthereareblanksattheendofthefile.
The program does not have to check for data or format errors in the file.
The submittal must include a matrixes.txt file that demonstrates the criteria mentioned in the above section of the matixes.txt required content.
The program must:
Process each matrix one at a time
Matrix displays can assume that each matrix entry is made up at most 4 integer places.
All data displays must be in a in a well formatted tabular style using spaces
Display the inputted matrix
Display a data list of the column vertical additive sums
Display a message that states whether this matrix has vertical additive symmetry or not
Display the sorted matrix rows
o Displayeachrowofthematrixinascendingorder,onerowperlineofoutput
Display a message that pauses the screen and states to enter a key to continue
Review the rules in the Required Best Practices document posted to the eLearning system. Ensure your program is well documented, well structured, modular and uses meaningful variable names.
Vertical Additive Symmetric Matrix
Use functions, with parameters, as necessary for good structure and readability. Do not use global variables.
All functions must exist after the main () functions, so use function prototypes. Use the following code to pause the screen:
cout << "Press the enter key once or twice to continue..." << endl; cin.ignore(); cin.get(); There is a system dependency that may require hitting the key twice for correct behavior. See the sample run output below to guide your programming and display outputs.
Example Run:
Given the following in the input file:
23
122545569834342177461-21102
Output:
Input:
Sums :
122545
569823
6812368
Vertical additive symmetry : Yes
Sorted:
122545
235698
Press the enter key once or twice to continue...
Input:
1177461-21102
Sums :
6887 Vertical additive symmetry : No
Sorted:
1177-21460112
Press the enter key once or twice to continue...
Program Done

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How do heredity and environment work togetherpg15

Answered: 1 week ago