File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Mandelbrot Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Mandelbrot" Watch "Mandelbrot" New topic
Author

Mandelbrot

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
Hello
Does someone know a smart solution for that problem?
Write a program that reads c and the number of generations from the command line, and prints that many iterations of the Mandelbrot equation. Also print (at the beginning of the output) the value used for c.
Be sure to handle all users errors (e.g. not providing two values on the command line) to the extent possible. Check the ranges of the data the user enters (e.g. don�t let the number of generations be less than 0). Print an error message and exit if a value outside the allowed range is entered. Provide a default value if none is given.
Detect if divergence has occurred (absolute value greater than 2) and stop output if so.
Thanks
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Sounds like an assignment. What is your specific question. I hope you are not expecting someone to write the assignment for you...


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Sheriff
You need stop this kind of practice. The same question post 3 or more forums. Throw teacher's assignment here, even without a little bit his/her own thinking.
This is not what JavaRanch for...
I've seen several already. This one is one of the worst.

Thanks!
Roseanne
Join our SCJD Study Group when certified

Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Originally posted by Mike Shn:
Also print (at the beginning of the output) the value used for c.
Be sure to handle all users errors
Check the ranges of the data the user enters (e.g. don�t let the number of generations be less than 0).
Print an error message and exit if a value outside the allowed range is entered.
Provide a default value if none is given.
Detect if divergence has occurred (absolute value greater than 2) and stop output if so.


Any more orders?

"JavaRanch, where the deer and the Certified play" - David O'Meara
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Fries and a shake.


Please ignore post, I have no idea what I am talking about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mandelbrot