Question in eclipes ??!!

Question in eclipes ??!!

Hooole EveryOne I have Question in eclipes !!? Question is :

The objectives of this lab are 1.Using the â?? thisâ?? reference. 2.Initializing class objects. 3.Using overloaded constructors.

Problem Description of this lab:

A.( The Complex Class) Design a class named Complex for performing arithmetic with complex numbers. Complex numbers have the form realPart + imaginaryPart * I where i is â?š-1 This class contains:

1.A private double data filed named real. 2.A private double data filed named imaginary. 3.A no-arg constructor that 4.A constructer that takes 2 arguments and initializes real part to r and imaginary part to i . 5.A method named Add : add two Complex numbers(the real parts are added together and the imaginary parts are added together). 6.A method named Subtract: subtract two Complex numbers (the real part of the right operand is subtracted from the real part of the left operand, and the imaginary part of the right operand is subtracted from the imaginary part of the left operand.). 7.A toString method that will return a String Return String representation of a Complex number.

(The ComplexTest class ) Design another class to test the Complex class. Ensure that all your methods and constructors work properly.

Soo thinks

View Answers

Related Tutorials/Questions & Answers: