The equation for the height (y) as a function of time for an object (ignoring air resistance) is: y(t)=12at2+v0t+y0 where: a=acceleration t=time v0=initial velocity y0=initial position/height and the velocity (v) is: v(t)=at+v0
Notes and Code | Outcome | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic ProgramWrite a program that calculates the position and velocity of an object with:
|
|
||||||||||||||||||||||||||||||||||||
FunctionsIf you have not already, write two functions to calculate position (y) and velocity (v) for a given time. Let your function have default values for acceleration (9.8), initial velocity (0), and initial position (0). |
|
||||||||||||||||||||||||||||||||||||
ClassCreate a ballistics class that has methods to calculate the position and velocity when given a specific time. |
|
||||||||||||||||||||||||||||||||||||
Maximum HeightWrite a program/method to determine the maximum height of the object. |
|