Displacement from Time and Velocity Example
Worked example of calculating displacement from time and velocity
<?xml version="1.0" encoding="UTF-8"?>
<!--Wed Jan 11 2012 16:18:18 GMT-0500 (EST)-->
<XholonWorkbook>
<Notes>
Khan Academy
------------
Title: Displacement from Time and Velocity Example
Description: Worked example of calculating displacement from time and velocity
Url: http://www.khanacademy.org/video/displacement-from-time-and-velocity-example?playlist=Physics
InternalName: displacement-from-time-and-velocity-example
YoutubeId: lQ-dvt3V4yQ
Keywords: physics, displacement, distance, rate, time
My Notes
--------
see code
</Notes>
<script implName="lang:python:inline:"><![CDATA[
t = 1 * 60
v = 5
direction = "south"
s = v * t
print str(s) + " meters to the " + direction
# http://ideone.com/VOne2
]]></script>
<script implName="lang:javascript:inline:"><![CDATA[
var t = 1 * 60;
var v = 5;
var direction = "south";
var s = v * t;
println(s + " meters to the " + direction);
//javascript:(function(){var t=1*60;var v=5;var direction="south";var s=v*t;alert(s+" meters to the "+direction);})()
]]></script>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Block/>
<!-- quantities -->
<Height superClass="Length"/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="#xpointer(Height)"/>
</Block>
</xholonClassDetails>
<PhysicalSystem>
<Block>
<Height>0.1 m</Height>
</Block>
</PhysicalSystem>
<Blockbehavior implName="lang:python:inline:"><![CDATA[
# This works if pasted in as a last child of Block.
height.incVal(0.02)
print("Python wants something to do. Height:" + str(height))
]]></Blockbehavior>
<Blockbehavior implName="lang:javascript:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
print("JavaScript wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:bsh:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
System.out.print("Java/Beanshell wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:jruby:inline:"><![CDATA[
require 'java'
# This works if pasted in as a last child of Block.
$height.incVal(0.02)
puts "Ruby wants something to do. Height: #{$height}"
]]></Blockbehavior>
<Blockbehavior implName="lang:groovy:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
System.out.print("Groovy wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
</XholonWorkbook>