File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes Problem in Assgnemnt 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Problem in Assgnemnt 6 "Grains"" Watch "Problem in Assgnemnt 6 "Grains"" New topic

Problem in Assgnemnt 6 "Grains"

Charles HAN

Joined: Jul 08, 2004
Posts: 10
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!

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, Charles!

We have a forum dedicated to discussing the Cattle Drive assignements. I'm moving this to the Cattle Drive forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Justin Simpson

Joined: May 21, 2004
Posts: 17

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.

Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9058
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.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
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.

[ July 11, 2004: Message edited by: Joyce Lee ]
Carol Murphy
village idiot

Joined: Mar 15, 2001
Posts: 1202
Charles, here is a big fat clue:
Don't overlook the obvious!
Good hunting!
Charles HAN

Joined: Jul 08, 2004
Posts: 10
Thanks all guys!
I've got it and it's working well!
I agree. Here's the link:
subject: Problem in Assgnemnt 6 "Grains"
It's not a secret anymore!