aspose file tools*
The moose likes Beginning Java and the fly likes can't find the logic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can Watch "can New topic
Author

can't find the logic

riris wijaya
Greenhorn

Joined: Mar 16, 2012
Posts: 7
hy all, i can't figure out the logic of this



The position of A and B is random. And A and B is linked by *. What is the logic of this?? do i have to make an array 10 x 10, and access the index randomly to put A??? or what??
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

what is the actual assignment, find the A and B positions and putting *'s? If so first of all find exact location of 'A' and 'B', then put the star's.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
riris wijaya
Greenhorn

Joined: Mar 16, 2012
Posts: 7
The assignment is to place A and B randomly, and connect it with *. So, whenever the program is run, the position of A and B is change and linked with *.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
Pencil and paper. That’s what you need. Write down an explanation of how you would do that. Once you have got it into very simple words (pseudo-code), it will be easy to convert to code.
tarun mall
Greenhorn

Joined: Nov 23, 2011
Posts: 13
riris wijaya wrote:hy all, i can't figure out the logic of this



The position of A and B is random. And A and B is linked by *. What is the logic of this?? do i have to make an array 10 x 10, and access the index randomly to put A??? or what??



The solution is pretty easy ;)

1. Fill A's row till B's column
2. Fill B's column till A's row
riris wijaya
Greenhorn

Joined: Mar 16, 2012
Posts: 7
i have found the way to place A and B randomly. Here is my scrip


but still, i can conect A and B with *. Is there any suggestion???
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

riris wijaya wrote:
but still, i can conect A and B with *. Is there any suggestion???


Same suggestion you've already received:
Campbell Ritchie wrote:Pencil and paper. That’s what you need. Write down an explanation of how you would do that. Once you have got it into very simple words (pseudo-code), it will be easy to convert to code.
dennis deems
Ranch Hand

Joined: Mar 12, 2011
Posts: 808
My suggestion is to scrap what you have done, turn off the computer, and follow Campbell's suggestion of solving the problem with pencil and paper. If you really do this, then writing the code will be simple. Well, okay I have a second suggestion: use the power of objects!
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

riris, please BeForthrightWhenCrossPostingToOtherSites <-- link
http://www.java-forums.org/new-java/57266-cant-find-logic.html


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can't find the logic