• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using recursion for shapes?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on this project in which in each recursion, I must insert 4 rings. RingComponent class has two instance variables; outerWidth and minWidth.
outerWidth is the width of the biggest ring in the shape.
minWidth is the width of the smallest ring in the shape, and this value is used to determine when to stop recursion. My problem is trying to get the rings to appear recursively within the already drawn circle.

Here is my code :

[/code]
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Devon.

Please, when you pose a question, take a step back and consider that your audience does not know what you're working on. You're referring to lots of stuff without ever actually explaining what they are. What recursion? What rings? What shape? What circle?

I don't think anyone will feel inclined to run your code just to find out what the problem is.

Take a look here please: HowToAskQuestionsOnJavaRanch
reply
    Bookmark Topic Watch Topic
  • New Topic