Results 1 to 4 of 4
  1. #1
    CCC3 is offline Member
    Join Date
    Oct 2011
    Posts
    2
    Rep Power
    0

    Default 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--

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default 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?

  3. #3
    CCC3 is offline Member
    Join Date
    Oct 2011
    Posts
    2
    Rep Power
    0

    Default 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?

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default 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

  1. Replies: 1
    Last Post: 01-19-2011, 10:23 PM
  2. Replies: 1
    Last Post: 01-06-2011, 10:56 PM
  3. Replies: 5
    Last Post: 10-09-2010, 06:22 AM
  4. Digits of an integer.
    By Allgorythm in forum New To Java
    Replies: 8
    Last Post: 01-01-2010, 03:34 AM
  5. Replies: 1
    Last Post: 03-31-2009, 07:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •