/**
 * This exercise requires you to concatenate the given strings based on specific conditions using short-circuiting with if-else.
 *
 * Your task is to complete the code by filling the missing values in the appropriate places. You must ensure the following:
 *
 * - If the officer's name is 'John Doe', the string representation should be 'Officer John Doe, rank: X'.
 * - If the officer's age is less than 30, the string representation should include 'Young officer'.
 * - If the officer's rank is 'Sergeant', the string representation should include 'High rank'.
 *
 * Your final result should be a concatenated string with all the appropriate conditions taken into account.
 */
fun concatenateStrings(name: String, age: Int, rank: String): String {

    var result = ""

    if (name == "John Doe") {
        result = "Officer John Doe, rank: "
    } else if (age < 30) {
        result = "Young officer "
    }

    if (rank == "Sergeant") {
        result += "High rank"
    }

    return result
}
/**
 * This exercise requires you to concatenate the given strings based on specific conditions using short-circuiting with if-else.
 *
 * Your task is to complete the code by filling the missing values in the appropriate places. You must ensure the following:
 *
 * - If the officer's name is 'John Doe', the string representation should be 'Officer John Doe, rank: X'.
 * - If the officer's age is less than 30, the string representation should include 'Young officer'.
 * - If the officer's rank is 'Sergeant', the string representation should include 'High rank'.
 *
 * Your final result should be a concatenated string with all the appropriate conditions taken into account.
 */
fun concatenateStrings(name: String, age: Int, rank: String): String {
/**
 * This exercise requires you to concatenate the given strings based on specific conditions using short-circuiting with if-else.
 *
 * Your task is to complete the code by filling the missing values in the appropriate places. You must ensure the following:
 *
 * - If the officer's name is 'John Doe', the string representation should be 'Officer John Doe, rank: X'.
 * - If the officer's age is less than 30, the string representation should include 'Young officer'.
 * - If the officer's rank is 'Sergeant', the string representation should include 'High rank'.
 *
 * Your final result should be a concatenated string with all the appropriate conditions taken into account.
 */
fun concatenateStrings(name: String, age: Int, rank: String): String {

    var result = ""

    if (name == "John Doe") {
        result = "Officer John Doe, rank: "
    } else if (age < 30) {
        result = "Young officer "
    }

    if (rank == "Sergeant") {
        result += "High rank"
    }

    return result
}