This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Please help!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Please help!!" Watch "Please help!!" New topic
Author

Please help!!

hoa tranh
Greenhorn

Joined: Oct 16, 2001
Posts: 2
please help...
i'm trying to build this class cat program but i do not know how to make the cat walks and jumps. For example, a cat is sitting in a room with 20 units wide, 30 units long, and 10 units height. Within this room, a cat cannot walk or jump exceed -10 to +10 width, and -15 to +15 in length, and 0 to +10 height. A cat is at center of the room at (0,0,0) where the first value (0) is for width and second is for length and thrid number is for distance above the floor. How do I make my cat to walk from this starting point (0,0,0) to let's say (4,6,0) or jump (1,0,4), not high above 4 units at a time, to the new location of (5,6,4). In desperate need of helppp.......thanx
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Wow! This is one strange program.
Ok lets start with a "cat" class. The class tells us where the cat is, the max distance the cat can travel, and accepts a request to move the cat. Some sudo-code (sudo means that you have to fix it up to get it to work.)

I didn't put anything in there to check for the maximum movement. But maybe this will get you started in the right direction.


Please ignore post, I have no idea what I am talking about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please help!!