/**
 * This function calculates the total profit for a carpenter after deducting the cost of materials.
 * The profit is determined by multiplying the hours worked by the hourly rate, and then subtracting the materials cost.
 */
fun calculateCarpenterProfit(hoursWorked: Double, hourlyRate: Double, materialsCost: Double): Double {

    val totalProfit = hoursWorked * hourlyRate - materialsCost
    return totalProfit
}
/**
 * This function calculates the total profit for a carpenter after deducting the cost of materials.
 * The profit is determined by multiplying the hours worked by the hourly rate, and then subtracting the materials cost.
 */
fun calculateCarpenterProfit(hoursWorked: Double, hourlyRate: Double, materialsCost: Double): Double {
/**
 * This function calculates the total profit for a carpenter after deducting the cost of materials.
 * The profit is determined by multiplying the hours worked by the hourly rate, and then subtracting the materials cost.
 */
fun calculateCarpenterProfit(hoursWorked: Double, hourlyRate: Double, materialsCost: Double): Double {

    val totalProfit = hoursWorked * hourlyRate - materialsCost
    return totalProfit
}