Results 1 to 4 of 4
- 10-26-2011, 06:32 PM #1
Member
- Join Date
- Oct 2011
- Posts
- 2
- Rep Power
- 0
Java help- 25-element array of digits to store integers as large as 25 digits
Hi I'm new to java but I'm trying to start a project for a class but i am having trouble understanding what exactly the outcome of the specs would do. Im not asking for code but in words could someone tell me what exactly i need to do for this project? here are the specs...
"Create a class HugeInteger which uses a 25-element array of digits to store integers as large as 25 digits each. Provide services inputHugeInteger, outputHugeIntegerr, addHugeIntegers, isEqualTo, and isOdd. inputHugeIntegere is to read a huge integer from the user. Hint: the Scanner class can be used to read the huge integer as a string. outputHugeIntegere is to print a huge integer to the display. addHugeIntegeres is to add two huge integers and returns the result as a third huge integer. isEqualto is to compare two huge numbers. If they are equal a true will be returned, otherwise, a false will be returned. Finally, isOdd returns true if the huge number is odd, and false if even.
Create a main driver class to instantiate two HugeInteger objects and exercise all the HugeInteger methods."
--Thank you--
- 10-27-2011, 01:59 PM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Re: Java help- 25-element array of digits to store integers as large as 25 digits
Uhm, it will create a "number" class that can handle integers of up to 25 digits, as the "specs" say. What is not to understand?
- 10-27-2011, 04:37 PM #3
Member
- Join Date
- Oct 2011
- Posts
- 2
- Rep Power
- 0
Re: Java help- 25-element array of digits to store integers as large as 25 digits
Like i said, im new to java and my knowledge and understanding is very little...perhaps a little more in depth of an answer could help me understand?
- 10-27-2011, 05:23 PM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Re: Java help- 25-element array of digits to store integers as large as 25 digits
Well, create an Array of length 25 of Type int, Store Each digit of the Passed in Number, starting at the right end, and then create Methods to do the actions requested.
Until you have actually Done something and come back with a real question, that is As much As you are going to get. Which, Not incidentally, is what you Started with.
Similar Threads
-
Value should be 7 or 8 digits .If 8 digits, the last should be a character
By renu in forum New To JavaReplies: 1Last Post: 01-19-2011, 09:23 PM -
Need to write a method to store array element positions
By marty78 in forum New To JavaReplies: 1Last Post: 01-06-2011, 09:56 PM -
Java program: ISBN calculated by other 9 digits?
By SNFA in forum New To JavaReplies: 5Last Post: 10-09-2010, 05:22 AM -
Digits of an integer.
By Allgorythm in forum New To JavaReplies: 8Last Post: 01-01-2010, 02:34 AM -
How to add an integer to a array element and the store that backinto an array.
By Hannguoi in forum New To JavaReplies: 1Last Post: 03-31-2009, 06:40 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks