class User
def initialize(name, score)
@name = name
@score = score
end
def name
@name
end
def name=(new_name)
@name = new_name
end
def get_info
"Name: #{@name}, Score: #{@score}"
end
end
user1 = User.new("Taro", 70)
user2 = User.new("Jiro", 90)
user1.name = "TARO"
puts user1.name