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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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