• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem in Assgnemnt 6 "Grains"

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,

I was doing the assignment 6 in Cattle Drive, and stuck with the "New class" that i have to found in standard java class library. Can any one tell me the class i need please?
The assignment is about the exponent, say i have 2 and powered with int i (0,1,2,3......,64),but with the i increasing the number will get larger and larger. So the problem is how to handle the number that is too big!

Cheers
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Charles!

We have a forum dedicated to discussing the Cattle Drive assignements. I'm moving this to the Cattle Drive forum...
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Charles

You have to find a class that can handle such a big number ! , look through the API documentation, you will find a class that fits the bill.

Justin
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the purposes of this assignment is "to become more familiar with the java libraries." One was to do this is to look through the classes in the java api documentation for a particular class which will fulfill the requirements for this assignment. It seems that if someone were to tell you which particular class to use, they would be depriving someone (you) of an education.
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Charles, hope that you've found the class. Narrow down the search by looking at the packages. For example, if you're working on RMI, look at the java.rmi.* packages for the related classes. Another example, applet-related classes will be in java.applet package. So now, you're looking for number-related class, which package would you think most likely in?

A warm welcome to Cattle Drive.

HTH,
Joyce
[ July 11, 2004: Message edited by: Joyce Lee ]
 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Charles, here is a big fat clue:
Don't overlook the obvious!
Good hunting!
 
Charles HAN
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks all guys!
I've got it and it's working well!
 
Alas, poor Yorick, he knew this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic