Results 1 to 5 of 5
  1. #1
    jwb4291 is offline Member
    Join Date
    Jul 2010
    Posts
    20
    Rep Power
    0

    Default NEED help with this program, if anyone could do it id appreciate it a LOT

    This programming assignment is about pi, you know: 3.14, and all that. You probably know someone who memorized some of its digits back in seventh grade. There are the 3.14 people, just about everyone, then there are the 3.14159, people, and finally there are the elite memorizers, who went to 3.14159265, and beyond. Pi is hard to memorize because its digits are seemingly random, and this assignment takes a first baby step toward assessing the randomness of number's digit pattern.(Click here for an accessible discussion of the nature of the digits of pi.)

    I've included a link to a text file that holds the first 100,000 digits of pi: digitsOfPt.txt
    Your job for this assignment is to read through that file and then build and display a table that reports the frequency of each of the digits 0 through 9. Your table should look like this:


    0 10001


    ..


    8 10271


    9 9994


    bad symbols: 123

    There are some other requirements.
    The file is actually slightly corrupted - it contains some symbols besides digits (spaces, for example). Your job as you read through the file is to skip over these, but also report how many non-digits there are in the file. To do this you can use Java's try-catch construction.
    Design arrays that most naturally use a non-numeric indexing scheme (here: the digits '0' through '9').
    Your solution must use inheritance.
    You must have a two class solution, a driver called PiDriver, and a principal class called PiCounter..

    SO the file is called digitsOfPt.txt
    and i need a PiDriver and a PiCounter
    if ANYONE could help with this i would APPRECIATE it a LOT.
    it is due tonight (July 31) at 11:45 pm est. THANKS

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

  3. #3
    jwb4291 is offline Member
    Join Date
    Jul 2010
    Posts
    20
    Rep Power
    0

    Default

    Norm, you're everywhere.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Locking thread. This is not a homework-doing service. Please feel free to start another thread that asks specific questions regarding your code, but that doesn't ask for the code to be done for you. This is your assignment, not ours, and we don't condone cheating. Good luck.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. changing my program to array working program
    By Chewart in forum New To Java
    Replies: 39
    Last Post: 11-18-2009, 06:53 PM
  2. Execute A program from a Program!
    By Moncleared in forum Advanced Java
    Replies: 2
    Last Post: 02-22-2009, 04:17 PM
  3. Executing a program within a program
    By gibsonrocker800 in forum New To Java
    Replies: 5
    Last Post: 05-12-2008, 08:24 AM
  4. Replies: 0
    Last Post: 04-04-2008, 02:40 PM
  5. Replies: 0
    Last Post: 10-04-2007, 09:33 PM

Posting Permissions

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