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

  Cpp file of the program

Student must submit each lab assignment along with two files: a working .cpp file of the program design and a screenshot of its program execution output in Word format.

  Show how to find out such a seating arrangement

Show how to find out such a seating arrangement and prove that no such seating plan is possible.

  What is microprocessor - motorola 68k assembly language

What is microprocessor - Motorola 68k assembly language? Implement your plan using a user vectored interrupt number 3. Use busy line from the printer to trigger the interrupt. The printer interrupt level is 2. Explain the extra hardware to make t..

  Make a clear button that will clear both text boxes

Your employer has requested the growth of a software application to calculate the area of a circle. The application must accept only one value (i.e., the radius), and it must display the result in decimal value.

  How are the enterprise software tools

How are enterprise software tools/enterprise resource planning used in helping to decrease the cost of designing and implementing new systems.

  Is filename generation happen on variable assignment

Will the following command always rightly loop through each of the positional parameters?

  About rtp sessions

Consider an RTP session consisting of four users, all of which are sending and receiving packets to same multicast address. Each user transmits the video at 100 kbps. RTCP will limit its traffic to what rate?

  Effects of technology

Select a new technology that interests you and analyze it from the sociological point of view. What do you consider this technology would contribute towards the society?

  Create the class named pizza

build an application named TestPizza that instantiates on Pizza object and demonstrates the use of Pizza set and get methods. Save as TestPizza.java

  Write a shell script instead of a shell function

When might it be necessary or advisable to write a shell script instead of a shell function? Give as many reasons as you can think of.

  How to redesign the coding design

How to redesign the coding design? Write down a sentence for each change you have optional, indicating what data entry problem (from part a) change will eliminate.

  Assume, a computer has 2^16 bytes of main memory

assume, a computer has 2^16 bytes of main memory. There is a direct-mapped cache of 1KB with a line size of 4 bytes. Determine which cache block will the memory reference 111Bh map to?

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