This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
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.