Application: Pendulum Clocks
Pendulums used in clocks, such as grandfather clocks, keep fairly accurate time for the following reason: When the length of a pendulum is large compared with the maximum arc of its swing, the time to complete one swing is independent of both the pendulum’s weight and the maximum displacement of the swing. When this condition is satisfied, the relationship between the time to complete one swing and the length of the pendulum is given by this formula:
length = 12.0 * g * [time/(2.0 * ð)]2
In this formula, ð accurate to four decimal places is equal to 3.1416, and g is the gravitational constant equal to 32.2 ft/sec2. When the time of a complete swing is given in seconds, the length of the pendulum is in feet. Using this formula, you’re to write a C++ program that calculates and displays the length of a pendulum needed to produce a swing that’s completed in 1 second. The length is to be displayed in inches.
Next, you apply the software development procedure to this problem.