Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Assgnemnt 6 "Grains"

 
Charles HAN
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • 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...
 
Justin Simpson
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • 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
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • 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.
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • 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 ]
 
Carol Murphy
village idiot
Bartender
Posts: 1203
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks all guys!
I've got it and it's working well!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic