import java.io.FileInputStream; import java.io.FileNotFoundException; public class NBody { /** * @param args * @throws FileNotFoundException */ public static void main(String[] args) throws FileNotFoundException { double big_t = Double.parseDouble(args[0]); double delta_t = Double.parseDouble(args[1]); String resourceFolder = "resources/"; String fileName = resourceFolder + args[2]; FileInputStream fileInputStream = new FileInputStream(fileName); System.setIn(fileInputStream); // Use StdIn to read from the file. int numBodies = StdIn.readInt(); double universeRadius = StdIn.readDouble(); // Print out the values read in (remove all this from your final version) StdOut.println("big_t = " + big_t); StdOut.println("delta_t = " + delta_t); StdOut.println("numBodies = " + numBodies); StdOut.println("universeRadius = " + universeRadius); } }