/** * This utility class provides information about the height of the CN tower. * * @author Franck van Breugel */ public class CNTower { private CNTower() {} /** * The height of the CN tower in meters. */ public static final int HEIGHT = 553; /** * Returns the ratio of the given height and the * height of the CN Tower. * * @param height the height of a building in meters. * @pre. height >= 0 * @return the given height divided by the height of the * CN tower. */ public static double ratio(int height) { return height / (double) CNTower.HEIGHT; } }