Maths & Java(Would you like to write the Program?)

hi everyone,

I have one program, and that has to write with the OOP and also related with Maths's ideas.

Would anyone help me to solve this? Here is the Program, and I gave the structure format below.

Class VLDI(very large decimal integer)models positive infinite precision integer.

VLDI i1 = new VLDI();//construct the no 0

VLDI i2 = new VLDI("12345678901234567890");

//convert the string into a VLDI

VLDI i3 = new VLDI("1234567890000")//convert the string into a VLDI

VLDI i4 = i2.add(i3);//return the sum of i2 and i3; i2 not changed

VLDI i4 = i2.shiftLeft(3); //return i2*10power3; not changed

VLDI i4 = i2.shiftright(4); //return i2/10power4; i2 not changed

String s = i2.toString()

//return a string representation of the digits in the VLDI

Thank Advance,

[849 byte] By [mgthura] at [2007-9-27 20:57:48]
# 1
Hi,Why not use java.math.BigDecimal or java.math.BigInteger? Seems to be exactly what you are talking about.Ben
bjnew at 2007-7-7 2:37:49 > top of Java-index,Other Topics,Algorithms...
# 2
>Why not use java.math.BigDecimal or java.math.BigInteger?Perhaps because it is homework and they are not allowed to use that?
jschell at 2007-7-7 2:37:50 > top of Java-index,Other Topics,Algorithms...
# 3
You know, you could be onto something there... :-PThen I would say to the original poster, look at the source code for BigInteger and take it from there.Ben
bjnew at 2007-7-7 2:37:50 > top of Java-index,Other Topics,Algorithms...
# 4
Hey,Try this library: http://algolist.manual.ru/download.php?path=/maths/freelip.zip.It is coded in CPP, but you can translate it into Java without any problem. Or try to seek with Google...Bye.
cebanenco at 2007-7-7 2:37:50 > top of Java-index,Other Topics,Algorithms...
# 5
don't bother us with your homework, stupid *******!
codymanix at 2007-7-7 2:37:50 > top of Java-index,Other Topics,Algorithms...