|
|
Subject:
Computing PI using Java
Category: Computers > Programming Asked by: 4meractor-ga List Price: $5.00 |
Posted:
13 Jul 2005 07:42 PDT
Expires: 12 Aug 2005 07:42 PDT Question ID: 543025 |
How do I calculate pi (Using Gregory Series) in Java with input dialog boxes? I need to prompt the user for the number of terms to estimate pi. |
|
There is no answer at this time. |
|
Subject:
Re: Computing PI using Java
From: mikm-ga on 19 Jul 2005 16:00 PDT |
I would recommed writing a seperate backend class to handle the PI computation. Have a method take all the necessary inputs then return PI. If you just need popups for inputs, use JOptionPane.showInputDialog() and JOptionPane.showMessageDialog() [http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JOptionPane.html < api] methods for input and response. Write a simple program to use these to feed inputs into the backend class and return the response. If you need something more complex, the frontend using the Swing library. If you don't know how, http://java.sun.com/docs/books/tutorial/uiswing/ is a good resource. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |