aspose file tools*
The moose likes Java in General and the fly likes creating random mole and removing it. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "creating random mole and removing it." Watch "creating random mole and removing it." New topic
Author

creating random mole and removing it.

Mac Subedi
Greenhorn

Joined: Nov 11, 2011
Posts: 5
Here i Created Ovals and loop it until 3 . My question is how can i

1) Draw a Oval at a random location and
2) If there are more than 5 Oval present how can i remove a random Oval, So far i have done this:









I hope this question make sense whoever is trying to help me. Thank YOU













Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39395
    
  28
You would need to create an array of moles and remove a member of that array.
That is one way to do it. There are lots of others.

I think you ought to create a Mole class.
Mac Subedi
Greenhorn

Joined: Nov 11, 2011
Posts: 5
would you give me some hints in code. ThankYOU
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39395
    
  28
Mac Subedi wrote:would you give me some hints in code. ThankYOU
No. Sorry.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating random mole and removing it.