Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final double KILOMETERS_PER_METER = 0.001;
- final float HOURS_PER_SECOND = 2.77777778e-4f;
- float time = 9.0f;
- double acceleration = 0.6;
- double currentSpeed;
- float distance;
- Double initialSpeed1 = Double.parseDouble (txtInitialSpeed.getText());
- time *= HOURS_PER_SECOND;
- acceleration *= KILOMETERS_PER_METER / (HOURS_PER_SECOND * HOURS_PER_SECOND);
- currentSpeed = initialSpeed1 + acceleration * time;
- lblCurrentSpeed.setText(
- Double.toString(currentSpeed));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement