Rudy control S

# Step 1: Define a class named `Person`
class Person
  # Step 2: Create an initialize method to set initial values for instance variables
  def initialize(name, age)
    @name = name
    @age = age
  end

  # Step 3: Define a method to display information about the person
  def display_info
    puts "Name: #{@name}, Age: #{@age}"
  end

  # Step 4: Create getter methods to access instance variables
  def name
    @name
  end

  def age
    @age
  end

  # Step 5: Create setter methods to modify instance variables
  def name=(new_name)
    @name = new_name
  end

  def age=(new_age)
    @age = new_age
  end
end

# Step 6: Create an instance of the Person class
person = Person.new("John Doe", 25)

# Step 7: Call the display_info method to show initial information
person.display_info

# Step 8: Use setter methods to modify instance variables
person.name = "Jane Doe"
person.age = 30

# Step 9: Call the display_info method again to show updated information
person.display_info