/***************************************
 * Program for Calculating the Force
 *   by Eric Hansen, Andy, and Mike
 * 2/8/2001
 ****************************************/
import javabook2.*;

class PhysicCalc{

    public static void main(String[] args) {
	// create javabook objects
	final double K = 6.67E-8;
	MainWindow mw = new MainWindow();
	InputBox in = new InputBox(mw);
	OutputBox out = new OutputBox(mw);
	mw.show();
	out.show();
	
	// get variable settings from user
	double mass1 = in.getDouble("What is the first mass?");
	double mass2 = in.getDouble("What is the second mass?");
	double distance = in.getDouble("What is the distance?");

	// calculations
	double force = K * ((mass1 * mass2) / Math.pow(distance, 2));

	// output
	out.printLine("The force is " + force);
    }
}
