/**
 * Calculate the weight of a rectangular prism given its volume and density.
 *
 * @param volume The calculated volume of the prism.
 * @param density The density of the material. Defaults to null.
 * @return The calculated weight of the prism if both volume and density are provided, otherwise null.
 */
fun calculateWeight(volume: Double, density: Double? = null): Double? {

    if (volume == null || density == null) {
        return null  // Placeholder indicating missing values
    }

    val weight = volume * density
    return weight
}
/**
 * Calculate the weight of a rectangular prism given its volume and density.
 *
 * @param volume The calculated volume of the prism.
 * @param density The density of the material. Defaults to null.
 * @return The calculated weight of the prism if both volume and density are provided, otherwise null.
 */
fun calculateWeight(volume: Double, density: Double? = null): Double? {
/**
 * Calculate the weight of a rectangular prism given its volume and density.
 *
 * @param volume The calculated volume of the prism.
 * @param density The density of the material. Defaults to null.
 * @return The calculated weight of the prism if both volume and density are provided, otherwise null.
 */
fun calculateWeight(volume: Double, density: Double? = null): Double? {

    if (volume == null || density == null) {
        return null  // Placeholder indicating missing values
    }

    val weight = volume * density
    return weight
}