/**
 * This exercise deals with performing operations on sets using for loop.
 * The goal is to count the number of common celestial bodies between stars and planets sets,
 * and return the count.
 *
 * @param astronomer The name of the astronomer.
 * @param stars Set containing names of stars.
 * @param planets Set containing names of planets.
 * @return The count of common celestial bodies between stars and planets sets.
 */
fun setOperations(astronomer: String, stars: Set<String>, planets: Set<String>): Int {

    val commonBodies = mutableSetOf<String>()
    
    for (star in stars) {
        for (planet in planets) {
            if (star == planet) {
                commonBodies.add(planet)
            }
        }
    }
    
    return commonBodies.size
}

// Example usage
val starSet = setOf("Sun", "Sirius", "Alpha Centauri", "Betelgeuse", "Vega", "Arcturus", "Polaris")
val planetSet = setOf("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto")

val result = setOperations("John Doe", starSet, planetSet)
/**
 * This exercise deals with performing operations on sets using for loop.
 * The goal is to count the number of common celestial bodies between stars and planets sets,
 * and return the count.
 *
 * @param astronomer The name of the astronomer.
 * @param stars Set containing names of stars.
 * @param planets Set containing names of planets.
 * @return The count of common celestial bodies between stars and planets sets.
 */
fun setOperations(astronomer: String, stars: Set<String>, planets: Set<String>): Int {
/**
 * This exercise deals with performing operations on sets using for loop.
 * The goal is to count the number of common celestial bodies between stars and planets sets,
 * and return the count.
 *
 * @param astronomer The name of the astronomer.
 * @param stars Set containing names of stars.
 * @param planets Set containing names of planets.
 * @return The count of common celestial bodies between stars and planets sets.
 */
fun setOperations(astronomer: String, stars: Set<String>, planets: Set<String>): Int {

    val commonBodies = mutableSetOf<String>()
    
    for (star in stars) {
        for (planet in planets) {
            if (star == planet) {
                commonBodies.add(planet)
            }
        }
    }
    
    return commonBodies.size
}

// Example usage
val starSet = setOf("Sun", "Sirius", "Alpha Centauri", "Betelgeuse", "Vega", "Arcturus", "Polaris")
val planetSet = setOf("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto")

val result = setOperations("John Doe", starSet, planetSet)