File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Please help!!" Watch "Please help!!" New topic

Please help!!

hoa tranh

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:
subject: Please help!!
It's not a secret anymore!