Design and implement a class matrixtype

Assignment Help Computer Engineering
Reference no: EM13322863

Design a to perform various matrix operations. class A matrix is a set of numbers arranged in rows and columns. Therefore, every element of a matrix has a row position and a column position. If A is a matrix of five rows and six columns, we say that the matrix A is of the size 5x6 and sometimes denote it as A5x6. Clearly, a convenient place to store a matrix is in a two-dimensional array.

Two matrices can be added and subtracted if they have the same size. Suppose A = [aij] and B = [bij] are two matrices of the size m x n, in which aij denotes the element of A in theith row and the jth column, and so on. The sum, difference, increment and decrement are given by:

A + B = [aij + bij]

A - B = [aij - bij]

A++ or ++A= [aij+1]

· Design and implement a class matrixType that can store a matrix of any size.

· Overload the operators +, - and ++ to perform the addition, subtraction and increment operations, resp..

· Overload the operator >> to take input in to a matrix from the user. First ask for the values of first row, then the values of the second row and so on.

· Overload the operator << to output a Matrix in the proper format i.e. each row on a new line and each value separated by whitespace. Also, write a test program to test various operations on the matrices.

TIPS:

-Use dynamic arrays to implement matrix.

-Follow the Rule of Three because we are using dynamic arrays.

- It is your choice to overload the operator using member function or friend function.

- Program asks user for size of A, then it asks the values of the members of A.

- Program asks user for size of B, then it asks the values of the members of B.

- The programs then outputs the sum of A and B, their difference, and then the value the following expression.

 

Reference no: EM13322863

Questions Cloud

Determine mean salary as well as the number of salaries : Input a list of employee salaries, and determine the mean (average) salary as well as the number of salaries above and below the mean.
Explain the process that a budget must go through to gain : What steps are made in making the decision as to whether a budget will be approved or not?
Compute the heat provided by combustion : Given the information below, calculate the heat provided by combustion of 66.1g of propane (C3H8). ?Hf° (C3H8(g)) = -103.85 kJ ?Hf° (CO2(g)) = -393.5 kJ ?Hf° (H2O(?)) = -285.8 kJ Can Someone explain this in detail
Write a program that request a student lastname : Write a program that request a student LastName and Social Security Number.
Design and implement a class matrixtype : Design a to perform various matrix operations. class A matrix is a set of numbers arranged in rows and columns. Therefore, every element of a matrix has a row position and a column position.
Compute the theoretical [oh-] in a saturated solution : The literature Ksp value for Mg(OH)2 is 1.810?11. (a) Calculate the theoretical [OH-] in a saturated solution of Mg(OH)2.(b) What volume of 0.00209 M HCl would be required to neutralize the OH- in 100.0 mL saturated Mg(OH)2 solution
Organized religion : 1. Organized religion" by definition reinforces the subordination of women to men.
Determine the final temperature and mass of the air : The tank is filled so quickly that the process is adiabatic and the seawater leaves the tank at 15oC. Determine the final temperature and mass of the air in the ballast tank.
What is the frequency in which the bat is received : A bat flying in complete darkness emits high frequency sound of 100 kHz to locate objects. What is the frequency in which the bat is received

Reviews

Write a Review

Computer Engineering Questions & Answers

  Are there any other examples of famous projects

Are LANs a stable technology or are they changing just as fastly as other forms of communication technologies?

  Write a program that accepts data continuously

Write a program that accepts data continuously

  While design a relational database

What guidelines/steps should you follow as you design a relational database? In addition to using the course material, use the Library to find best-practice guidelines. Be sure to cite your sources.

  Write the program in java

Write the program in Java (with a graphical user interface) so that it would allow the user to select which way they want to calculate a mortgage: by input of the amount of the mortgage.

  Determining the cost of line for new connections

The points T1, T2, and T3 are 25 miles apart, and the points C1, C2, and C3 also are 25 miles apart. If the telephone lines cost $1 per mile, explain the line cost for three.

  Make a class named order that performs order processing

build 4 Order class fields: order number, customer name, quantity ordered, and total price. Create public accessors for each field except total price.

  How electricity usage file the amount of electricity

make an electricity usage report showing the customer number.

  Program to generate professor rating class

Write down the program which generates a Professor Rating class containing of the professor ID and three ratings. The three ratings are utilized to evaluate the easiness, helpfulness, and clarity.

  Pseudorandom numbers

In any use of the pseudorandom numbers, whether for the encryption, simulation or the statistical design.

  What is the best way to write down the value ''7564''

What is the best process to write the value '7564' and make it clear to the reader that the number should be interpreted as a hexadecimal value?

  Compute the record size r in bytes

suppose the file is ordered by SSN; calculate the number of blocks it takes to search for a record given its SSN value by doing a binary search.

  Programming for a pattern

Write down a program in order to print the following pattern on screen.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd