/**
 * Given the volume and density of a material, calculate its mass.
 * Use the break statement to exit the loop when the desired object is found.
 *
 * @param volume A map containing the volumes of various objects.
 *               The keys represent the object names and the values represent the volumes.
 * @param density A map containing the densities of various objects.
 *                The keys represent the object names and the values represent the densities.
 * @return The mass of the desired object.
 */
fun calculateArea(volume: Map<String, Double>, density: Map<String, Double>): Double {

    var mass = 0.0

    for ((objectName, objectVolume) in volume) {
        for ((name, densities) in density) {
            if (objectName == name) {
                mass = objectVolume * densities
                break
            }
        }
    }

    return mass
}
/**
 * Given the volume and density of a material, calculate its mass.
 * Use the break statement to exit the loop when the desired object is found.
 *
 * @param volume A map containing the volumes of various objects.
 *               The keys represent the object names and the values represent the volumes.
 * @param density A map containing the densities of various objects.
 *                The keys represent the object names and the values represent the densities.
 * @return The mass of the desired object.
 */
fun calculateArea(volume: Map<String, Double>, density: Map<String, Double>): Double {
/**
 * Given the volume and density of a material, calculate its mass.
 * Use the break statement to exit the loop when the desired object is found.
 *
 * @param volume A map containing the volumes of various objects.
 *               The keys represent the object names and the values represent the volumes.
 * @param density A map containing the densities of various objects.
 *                The keys represent the object names and the values represent the densities.
 * @return The mass of the desired object.
 */
fun calculateArea(volume: Map<String, Double>, density: Map<String, Double>): Double {

    var mass = 0.0

    for ((objectName, objectVolume) in volume) {
        for ((name, densities) in density) {
            if (objectName == name) {
                mass = objectVolume * densities
                break
            }
        }
    }

    return mass
}