/**
 * Calculate the total cost of painting a room based on the area and the prices of different paint colors.
 *
 * @param roomArea The area of the room to be painted.
 * @param paintColors A list of available paint colors.
 * @param paintPrices A map where the keys are paint colors and the values are their respective prices per square meter.
 * @return The total cost of painting the room.
 */
fun calculateRoomCost(roomArea: Double, paintColors: List<String>, paintPrices: Map<String, Double>): Double {

    var totalCost = 0.0  // Initialize the total cost

    for (color in paintColors) {
        if (color in paintPrices) {
            val costPerSquareMeter = paintPrices[color] ?: 0.0
            totalCost += roomArea * costPerSquareMeter
        }
    }

    return totalCost
}

// Example usage
val roomArea = 30.5  // Area of the room in square meters

// Available paint colors for the Interior Designer
val paintColors = listOf("white", "blue", "green", "red")

// Prices of paint colors per square meter
val paintPrices = mapOf(
    "white" to 5.0,
    "blue" to 6.0,
    "green" to 4.5,
    "red" to 7.0
)
/**
 * Calculate the total cost of painting a room based on the area and the prices of different paint colors.
 *
 * @param roomArea The area of the room to be painted.
 * @param paintColors A list of available paint colors.
 * @param paintPrices A map where the keys are paint colors and the values are their respective prices per square meter.
 * @return The total cost of painting the room.
 */
fun calculateRoomCost(roomArea: Double, paintColors: List<String>, paintPrices: Map<String, Double>): Double {
/**
 * Calculate the total cost of painting a room based on the area and the prices of different paint colors.
 *
 * @param roomArea The area of the room to be painted.
 * @param paintColors A list of available paint colors.
 * @param paintPrices A map where the keys are paint colors and the values are their respective prices per square meter.
 * @return The total cost of painting the room.
 */
fun calculateRoomCost(roomArea: Double, paintColors: List<String>, paintPrices: Map<String, Double>): Double {

    var totalCost = 0.0  // Initialize the total cost

    for (color in paintColors) {
        if (color in paintPrices) {
            val costPerSquareMeter = paintPrices[color] ?: 0.0
            totalCost += roomArea * costPerSquareMeter
        }
    }

    return totalCost
}

// Example usage
val roomArea = 30.5  // Area of the room in square meters

// Available paint colors for the Interior Designer
val paintColors = listOf("white", "blue", "green", "red")

// Prices of paint colors per square meter
val paintPrices = mapOf(
    "white" to 5.0,
    "blue" to 6.0,
    "green" to 4.5,
    "red" to 7.0
)