Challenge 45 – How High Will I Go?
This Challenge involved creating a function that will help determine, how high an object will travel, given an initial velocity, weight and launch angle.
A Physicist is interested in creating a function that will help her determine, how high a rock will travel, given the following inputs:
- Rock Weight (input 0.0 – 10,000 pounds)
- Initial Velocity (input 0.0 – 1000.0 feet per second)
- Launch Angle (input 1.0 – 90.0 degrees)
The output of the equation will be maximum height off the ground in inches.
- No air friction or wind
- Constant Earth gravity
- Write a function that will compute how high a rock will travel given a weight, velocity, and launch angle.
- Accuracy should be to the nearest 0.1 inch.
Winners (out of approximately 10 respondents)
Thanks to everybody for your responses to SCS Coding challenge #45!!!
|Name||Prize Winner||Good Answer|
Congratulations to Allison Benneth for her fine efforts to come up with a workable solution, and for commenting and documenting her solution.
Monthly Programming Tips
Making a retirement announcement
Developers who own re-distributable components and want to deprecate a method in the near future, can embellish it with the Obsolete attribute to alert the client that this method is can still be used but is obsolete, so the user should use XYZ method, instead. Check out the following C# sample code.
Upon compilation, a client gets a warning with the message.
To cause a client build to fail while using an obsolete method, pass the additional Boolean parameter as True. This will prevent the user from using this method.
Coding Challenge #46
Please stay tuned, SCS Coding Challenge #45 will be published this week. Details will follow. The winner will be awarded based upon the best approach.