Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,156,203 members, 7,829,306 topics. Date: Thursday, 16 May 2024 at 01:23 AM

I Need An Urgent Help With A Question In Java. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / I Need An Urgent Help With A Question In Java. (796 Views)

Problem With Bufferedinputstream Read Blocking Issue In Java / I Want To Develop A Software In Java To Calculate CGPA / How Do Io Create Ribbon Ui In Java (2) (3) (4)

(1) (Reply)

I Need An Urgent Help With A Question In Java. by joycej(f): 8:32pm On Jan 16, 2011
Complex numbers have the form for performing arithemetic with complex numbers. Write a driver program to test your class.
complex numbers have d form
real part + imaginary part * i

where i is d root of -1
Use floating-point variables to represent the private data of the class. Provide a constructor
method that enables an object of this class to be initialized when it is declared.
Provide a no-argumentment constructor with default values in case no initializers are provided. Provide public methods
for each of the following:
a) Addition of two Complex numbers: The real parts are added together and the imaginary
parts are added together.
b) Subtraction of 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.
c) Printing Complex numbers in the form (a,b), where a is the real part and b is the
imaginary part.

(1) (Reply)

Seeking For A Unix/linux, Java Guy Or Female / This NOT CLEAR To Me! / Programming Shopping Cart Issue Wondering How They Do It

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.