Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please visit this link for code. http://courses.muscedere.com/8821101/Lab53.txt . I posted question 1 and 2 previously few minutes ago. Pls help me answer those too. If

Please visit this link for code. http://courses.muscedere.com/8821101/Lab53.txt . I posted question 1 and 2 previously few minutes ago. Pls help me answer those too. If you can view my profile you can see the post. I will give high rating for everything. pls help.

image text in transcribed

Copy your results from the missing two parts of the output above into the appropriate spaces on the right. They should all be complex numbers. Tbe other results should be identical to those in section 2. Under normal circumstances we would have placed our complex and matrix code in separate files and just 3. A COMBINED COMPLEX MATRIX CLASS Now that we have established a base complex number class we can use it in our matrix class so that it can work with complex numbers. We will do this by merging your existing code from section 1 and section 2 into a newincluded them from this project; this would have made things more manageable. code base. This lab is mcant to illustrate how we can build basic functionality into a classes and combine them to create more powerful software. As noted we made only a couple changes in the matrix to enable it to support complex numbers. Some of these changes could have been avoided by using an additional C+fcature known as templates Copy all but the main function from the code in section 1 into a new project. If you are using Visual C+make sure the #include stdafx.h is present. Add the following lines right after the pasted code typedef Complex mattype define ytabs (x)x These two lines tell the matrix class what our base storage is; in section 2 it was a double, now it is "Complex" The define statement tells our class how to calculate the absolute value of the base class; here we use the"" operator which we defined as providing the magnitude of the complex number Next copy all the code from section 2 (starting right at the matrix class declaration, "class Matrix", up to the end of the class functions but not including the main code) into your new code project. Open http:l/courses.muscedere.com/8821101/Lab53.txt and copy the contents into your project at the end of the existing code; this is the new main code. Assuming that you have properly completed sections 1 and 2, the code should run producing the output shown below: Matrix A: 1 23 4 5 6 Matrix A*101 Matrix B/ (10+105: 10 20 30 40 50 60 Matrix B: 7 8 9 10 11 12 Matrix B/ (10+10)) Matrix C-A *

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