/**
 * Calculate the tax payable by an individual given their income, deductions and business ownership status.
 *
 * @param income The total income of the individual.
 * @param deductions The total deductions for the individual.
 * @param isBusinessOwner True if the individual is a business owner, False otherwise.
 * @return The tax payable by the individual after applying deductions and considering their business ownership.
 */
fun calculateTax(income: Double, deductions: Double, isBusinessOwner: Boolean): Double {

    // Check if the individual is a business owner
    val tax: Double
    if (isBusinessOwner) {
        // Calculate tax using complex formula for business owners
        tax = (income - deductions) * 0.3
    } else {
        // Calculate tax using simplified formula for non-business owners
        tax = (income - deductions) * 0.2
    }
    return tax
}
/**
 * Calculate the tax payable by an individual given their income, deductions and business ownership status.
 *
 * @param income The total income of the individual.
 * @param deductions The total deductions for the individual.
 * @param isBusinessOwner True if the individual is a business owner, False otherwise.
 * @return The tax payable by the individual after applying deductions and considering their business ownership.
 */
fun calculateTax(income: Double, deductions: Double, isBusinessOwner: Boolean): Double {
/**
 * Calculate the tax payable by an individual given their income, deductions and business ownership status.
 *
 * @param income The total income of the individual.
 * @param deductions The total deductions for the individual.
 * @param isBusinessOwner True if the individual is a business owner, False otherwise.
 * @return The tax payable by the individual after applying deductions and considering their business ownership.
 */
fun calculateTax(income: Double, deductions: Double, isBusinessOwner: Boolean): Double {

    // Check if the individual is a business owner
    val tax: Double
    if (isBusinessOwner) {
        // Calculate tax using complex formula for business owners
        tax = (income - deductions) * 0.3
    } else {
        // Calculate tax using simplified formula for non-business owners
        tax = (income - deductions) * 0.2
    }
    return tax
}