-
February 3rd, 2006, 08:43 PM
#1
-
February 6th, 2006, 06:42 PM
#2
If I were you I would simply create another moduel to your program that converts your private variables and work into strings for output. Or you could just do something along the lines of this:
Code:
real = rr;
imaginary = ii;
public double magnitude() { // return the sq root of Complex number
return Math.sqrt(r*r + i*i);
this would output the answer and you could put a line above it that explains what you told the program to do to the varibles it took into the buffer
so for example you could have something like this above :
Code:
real = rr;
imaginary = ii;
public double magnitude() { // return the sq root of Complex number
system.out.println( "i told this hunk of crap to make the sqrt of a complex number using the Math.sqrt(real*real + imaginary*imaginary) function" );
return Math.sqrt(r*r + i*i);
you could devise a much more complicated system for this where when you told three calc to do something it would append that process to the output line of the line....but then you would have to add a string variable that made sense to each type of calculation that you would want your calc to be able to preform
http://www.antionline.com/showthread...hreadid=273394 (an example of a calc i did for complex numbers)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|