PSI Java app

For any of you who are too lazy to get a calculator and do teh math, I made a java app for you! Open up notepad and type or copy/pasta:

import java.util.Scanner;

/** @(#) PowerLevel.java

 * App for calculation of PSI

 *

 * @author Ean

 * @version 1.00 11/20/11

*/

//Whoever came up with the formula, good job! I take no credit for the formula, just for the app.

public class PowerLevel {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

double psi = 0.00000000005;

System.out.println('Psi = ' + psi);

double psiMoving = 0.5 * 0.0000001 * 0.00001;

System.out.println('Psi is moving 1 micrograme (@ cm per second) . So Psi moving is ' + psiMoving);

System.out.println('Enter the amount (in kilogrammes) of target weight:');

double targetWeight = in.nextDouble();

double psiNeeded = (0.5 * targetWeight * 0.00001) / 0.00000000005;

System.out.println('You will need to use ' + psiNeeded + ' of psi.');

}

}

save it as 'PowerLevel.java' with quotes. Open another window. Type:

@echo off

:start
 
echo Compiling...
javac PowerLevel.java
echo Compile complete!
echo Running...
java PowerLevel
pause
exit
 
and save that as 'PowerLevelApp.bat' again with quotes. Make sure it is in the same location as the java file.
Run the new batch.
*NOTE: I am assuming you already have the java development kit and have set the PATH variable. If you havent, google it.
 
If there are any errors in the formula, please tell me. Thanks!

Vote & Share

7 Comments

Enter a Comment:


Top Comments

Avatar

Ean

By Ean

BTW, if you want the CLASS version of this, then pm me.

Reply
0
0

2 years ago

Avatar

ohya5

By ohya5

good job .............................

Reply
0
0

2 years ago

Everything Else...

Avatar

Ean

By Ean

lol cool I'm taking java

Reply
0
0

2 years ago

Avatar

Koori_shinobi

By Koori_shinobi

I want to program! I wish to major in Computer Science! *puts on scholarly face*

Reply
0
0

2 years ago

Avatar

Ean

By Ean

Wait, what does 0.01(squire) equal?

Reply
0
0

2 years ago

Avatar

Ean

By Ean

thanks. @fgopl woot programming awesoma powa!

Reply
0
0

2 years ago

Avatar

fgopl

By fgopl

Ooh... I do programming.

Reply
0
0

2 years ago

Avatar

ohya5

By ohya5

good job .............................

Reply
0
0

2 years ago

Avatar

Ean

By Ean

BTW, if you want the CLASS version of this, then pm me.

Reply
0
0

2 years ago