class User
@@count = 0
def initialize(name, score)
@name = name
@score = score
@@count += 1
end
def get_info
"Name: #{@name}, Score: #{@score}"
end
def self.get_info
"Count: #{@@count}"
end
end
# count = 0
user1 = User.new("Taro", 70)
# count += 1
user2 = User.new("Jiro", 90)
# count += 1
# puts count
puts User.get_info