/**
 * Calculates the total material amount for a fashion designer, considering the given parameters.
 *
 * @param unitCost The cost per unit of a material.
 * @param quantity The number of units of the material.
 * @param discountPercentage The percentage of discount applied on the material cost.
 * @param taxPercentage The percentage of tax added on the material cost.
 * @return The total amount of material cost after applying discount and adding tax.
 */
fun calculateTotalMaterialAmount(unitCost: Double, quantity: Int, discountPercentage: Double, taxPercentage: Double): Double {

    // Applying discount
    val discountAmount = unitCost * quantity * discountPercentage / 100
    val discountedUnitCost = unitCost - discountAmount / quantity

    // Adding tax
    val taxAmount = discountedUnitCost * quantity * taxPercentage / 100

    // Calculating total material amount
    val totalAmount = (discountedUnitCost * quantity) + taxAmount

    return totalAmount
}

// Example usage
val materialUnitCost = 25.0
val materialQuantity = 100
val materialDiscountPercentage = 10.0
val materialTaxPercentage = 12.5

val totalMaterialAmount = calculateTotalMaterialAmount(materialUnitCost, materialQuantity, materialDiscountPercentage, materialTaxPercentage)
/**
 * Calculates the total material amount for a fashion designer, considering the given parameters.
 *
 * @param unitCost The cost per unit of a material.
 * @param quantity The number of units of the material.
 * @param discountPercentage The percentage of discount applied on the material cost.
 * @param taxPercentage The percentage of tax added on the material cost.
 * @return The total amount of material cost after applying discount and adding tax.
 */
fun calculateTotalMaterialAmount(unitCost: Double, quantity: Int, discountPercentage: Double, taxPercentage: Double): Double {
/**
 * Calculates the total material amount for a fashion designer, considering the given parameters.
 *
 * @param unitCost The cost per unit of a material.
 * @param quantity The number of units of the material.
 * @param discountPercentage The percentage of discount applied on the material cost.
 * @param taxPercentage The percentage of tax added on the material cost.
 * @return The total amount of material cost after applying discount and adding tax.
 */
fun calculateTotalMaterialAmount(unitCost: Double, quantity: Int, discountPercentage: Double, taxPercentage: Double): Double {

    // Applying discount
    val discountAmount = unitCost * quantity * discountPercentage / 100
    val discountedUnitCost = unitCost - discountAmount / quantity

    // Adding tax
    val taxAmount = discountedUnitCost * quantity * taxPercentage / 100

    // Calculating total material amount
    val totalAmount = (discountedUnitCost * quantity) + taxAmount

    return totalAmount
}

// Example usage
val materialUnitCost = 25.0
val materialQuantity = 100
val materialDiscountPercentage = 10.0
val materialTaxPercentage = 12.5

val totalMaterialAmount = calculateTotalMaterialAmount(materialUnitCost, materialQuantity, materialDiscountPercentage, materialTaxPercentage)