Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this lab you will practice including a library that was created in another language known as VB (Visual Basic), using arrays and structures, and

In this lab you will practice including a library that was created in another language known as VB (Visual Basic), using arrays and structures, and reading from files. As the application programmer there is no requirement on your side to know anything about VB but you will need to know how to include a library in your project. This lab contains step-by-step instructions on how to add the library to your project. In your application you will be calling functions that will compute complex number math. A complex number consists of a real part and an imaginary part: (c=a+bi where c is the complex number, a is the real part, b is the imaginary part, i is root square of -1)

Write code in C#

image text in transcribed

The complex math library that is given to you contains math operations add, subtract, multiply, and divide. Below is a screen shot of the program. You do not need to know how the program is written but you need to know what the functions require in terms of the number and data type of the arguments and return value. It has methods that add, subtract, multiply and divide. image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

You need to use the array concept to read information from file. Youll need to create a Structure and then create an array of that Structure. The Structure should contain two variables, real and imaginary. Be sure to declare an array that is at least large enough to hold all of the values from the file. An example of calling one of the math functions from the library with the Structure array as a parameter is shown below. ComplexMath.MathFunctions.Add(complexNums[i].real, complexNums[i].imaginary, complexNums[i + 1].real, complexNums[i + 1].imaginary);

I need help with Part B please. I do not understand any of it.

(a +bi) + (c + di) - (a c)+(b +d)i (a bi) (c+ di) (a -c)+ (b -d)i (a bi)* (c+ di) (ac-bd)(ad + bc)i (a + bi) - (c + di) - (a +bi) (c +di (ac+bd)bc-ad) (For additional inform please refer to your Calculus books or your algebra books) PART A The Complex Number Math library is provided for you with functions that perform these computations You will simply include this library (ComplexMat.dl) on to your project folder and then you will be able to call the functions. Follow the steps shown in the screen shots on the next page to include ComplexMath.dll to your solution References folder (a +bi) + (c + di) - (a c)+(b +d)i (a bi) (c+ di) (a -c)+ (b -d)i (a bi)* (c+ di) (ac-bd)(ad + bc)i (a + bi) - (c + di) - (a +bi) (c +di (ac+bd)bc-ad) (For additional inform please refer to your Calculus books or your algebra books) PART A The Complex Number Math library is provided for you with functions that perform these computations You will simply include this library (ComplexMat.dl) on to your project folder and then you will be able to call the functions. Follow the steps shown in the screen shots on the next page to include ComplexMath.dll to your solution References folder

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions