Home Segments Index Top Previous Next

115: Practice

Define a method for the Integer class that computes how long it takes an object to fall, in seconds, given that the distance to be covered, in meters, is the receiver. Use the formula s = 1/2 a t2, where a = 9.8 m/sec2. Use your method to determine how long a cannon ball takes to drop to the ground from the top of a 10-story building.