Wait! Don't freak out! I know this says kinematics, but you aren't required to know any physics to do this activity. Just some algebra and programming skills, thats it. I promise.
Description: In this event you will be writing a program that solves equations. The equation you will be using is
d = vi * t + (1/2) * a * ( t ^ 2 ).
Where d is distance, vi is initial velocity, a is acceleration and t is time.
Since we have one equation with four variables, we are required to know any three variables to solve for the last variable.
This program must effectively:
Get the value of any three variables, then solve for the last variable and display the result. The three known variables must be dynamic. Meaning the user must be able to pick which three variables are known and which one is not known. It is up to you to figure out how to do this.
I am not posting requirements on this one, I want to see how you all decide to get the information from the user and display it back. You can use any method you want, command line arguments, file I/O, or terminal I/O (although all should atleast have terminal out). You can use classes, structures, or just have the whole solution in one function. Do whatever you think is the best way for you to do it. Spend some time on it though, make sure that the user is getting a nice interface and a fully functional program, and I want to read your source so try to keep it neat! Last event's participants did a great job at this.
Advanced:
For those interested in doing advanced functionality, I highly recommend coming up with a solution to this advanced section. Please make sure you code the original program first though, so you can help with other members that might have questions.
The four basic kinematic equations are:
Kinematic Equations and Problem-Solving
d = vi * t + (1/2) * a * t ^ 2
vf ^ 2 = vi ^ 2 + 2 * a * d
vf = vi + a * t
d = ( t / 2 ) * ( vi + vf )
where
d = distance
vi = initial velocity
vf = final velocity
t = time
a = acceleration
Notice that using these four equations, only one new variable was added (vf) yet 3 new functions were added. Also notice how each equation differs from all the others by exactly one variable.
d = vi * t + (1/2) * a * t ^ 2
d, vi, t, a
vf ^ 2 = vi ^ 2 + 2 * a * d
d, vi, vf, a
vf = vi + a * t
vf, vi, a, t
d = ( t / 2 ) * ( vi + vf )
d, vi, vf, a
With this new set of equations, the user can know exactly any three variables and solve for any other variable. So Instead of knowing three variables and solving for one unknown, a physicist can know three variables and solve for both unknowns.
Well in order to do this, the value obtained as the result of one equation will then be used in a different equation, etc.
For example lets say that we know d, vi, and a.
the program then needs to solve for t and vf.
since equation 1 has the three given values and t, t can be solved for in equation one.
Now the program can use any other equation to solve for vf.