/**
 * This function calculates the total legal fees based on the given legal procedures.
 * Each legal procedure has an associated fee which is stored in a Pair.
 * The function will loop through the legal procedures and calculate the total fees.
 *
 * @param legalProcedures A list of legal procedures represented as Pairs,
 * where each Pair contains the name of the procedure and its associated fee.
 * @return The total legal fees calculated.
 *
 * Example:
 * val legalProcedures = listOf(Pair("Filing the case", 500), Pair("Attending court hearings", 350),
 *                               Pair("Drafting legal documents", 200), Pair("Negotiating settlements", 400))
 * calculateLegalFees(legalProcedures)
 * Output: 1450
 */
fun calculateLegalFees(legalProcedures: List<Pair<String, Int>>): Int {

    var totalFees = 0

    for (procedure in legalProcedures) {
        // Retrieve the fee from the Pair and add it to the total fees
        totalFees += procedure.second
    }

    return totalFees
}
/**
 * This function calculates the total legal fees based on the given legal procedures.
 * Each legal procedure has an associated fee which is stored in a Pair.
 * The function will loop through the legal procedures and calculate the total fees.
 *
 * @param legalProcedures A list of legal procedures represented as Pairs,
 * where each Pair contains the name of the procedure and its associated fee.
 * @return The total legal fees calculated.
 *
 * Example:
 * val legalProcedures = listOf(Pair("Filing the case", 500), Pair("Attending court hearings", 350),
 *                               Pair("Drafting legal documents", 200), Pair("Negotiating settlements", 400))
 * calculateLegalFees(legalProcedures)
 * Output: 1450
 */
fun calculateLegalFees(legalProcedures: List<Pair<String, Int>>): Int {
/**
 * This function calculates the total legal fees based on the given legal procedures.
 * Each legal procedure has an associated fee which is stored in a Pair.
 * The function will loop through the legal procedures and calculate the total fees.
 *
 * @param legalProcedures A list of legal procedures represented as Pairs,
 * where each Pair contains the name of the procedure and its associated fee.
 * @return The total legal fees calculated.
 *
 * Example:
 * val legalProcedures = listOf(Pair("Filing the case", 500), Pair("Attending court hearings", 350),
 *                               Pair("Drafting legal documents", 200), Pair("Negotiating settlements", 400))
 * calculateLegalFees(legalProcedures)
 * Output: 1450
 */
fun calculateLegalFees(legalProcedures: List<Pair<String, Int>>): Int {

    var totalFees = 0

    for (procedure in legalProcedures) {
        // Retrieve the fee from the Pair and add it to the total fees
        totalFees += procedure.second
    }

    return totalFees
}