Earn Higher Grades With Instant Academic Help.Ask Question!

(5/5)

### mathematics, a matrix is a rectangular array of numbers, arranged in rows and columns. For example, the dimension of the matrix is 2 x 3

INSTRUCTIONS TO CANDIDATES
###### ANSWER ALL QUESTIONS

COMP 218 -- Object-Oriented Programming

students are expected to write, run, test, and debug a fully-working C++ program for the following computing problem:

In mathematics, a matrix is a rectangular array of numbers, arranged in rows and columns. For example, the dimension of the below matrix is 2 x 3 (read “two by three”), because there are two rows and 3 columns:

𝐴  = [ 1      2 −1]

−1    0      3

Matrices can be called sparse or dense depending on the number of zero elements. A sparse matrix is a matrix in which most of the elements are zero. By contrast, if most of the elements are nonzero, then the matrix is considered dense. For dense matrices, all values need to be stored in the system. However, for sparse matrices, since the number of non-zero values is less, instead of unnecessarily occupying memory for zero values, we may store the corresponding row and column information of the non-zero values in the system. To be more specific, for a dense matrix, every cell of the matrix needs to occupy memory, however, for a sparse matrix, only row, column, and value information needs to be stored.

Both sparse and dense matrices are to be derived from the general matrix class. The general matrix class should contain a couple of pure virtual functions, namely, the get, set, and resize, to be overridden by the sparse/dense matrices to meet their specific needs. Also note that, for a sparse matrix, get function needs to apply a kind of search operation since we are not storing the whole n x m system.

Some mathematical operations that need to be defined are the matrix addition, subtraction, and multiplication. Matrix transpose, multiplying by a constant, and testing whether two matrices commute (equal) or not, are the other functions that should be defined. Moreover, inputting and outputting of the matrices should be presented in such a way that a user may specify values into the matrices. Remember, when possible, operator functions need to be overloaded.

Partial grading will be applied in case there is no full implementation.

(5/5)

## Related Questions

##### . Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

##### . The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

##### . Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

##### . SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

##### . Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

### Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed ##### Ashutosh NautiyalComputer science
(/5)

699 Answers

Hire Me ##### Smayan DasComputer science
(/5)

573 Answers

Hire Me ##### Goueth Issola Gouater Loic DimitriEngineering
(/5)

798 Answers

Hire Me (4/5)

12 Answers

Hire Me