class Car
def initialize(make, model)
\_\_\_make = make
\_\_\_model = model
end
endkitt = Car.new(“Pontiac”, “Trans Am”)
@
class Car
def initialize(\_\_\_, \_\_\_\_)
@make = make
@model = model
end
endkitt = Car.new(“Pontiac”, “Trans Am”)
make, model
class Car
\_\_\_ initialize(make, model)
@make = make
@model = model
end
endkitt = Car.new(“Pontiac”, “Trans Am”)
def
class Car
def initialize(make, model)
@make = make
@model = model
end
endkitt = Car.___(“Pontiac”, “Trans Am”)
new
to make a global variable in methods
class MyClass \_\_\_\_my_variable = "Hello!" end
puts ____my_variable
$
class Person # Set your class variable to 0 on line 3 \_\_\_\_people_count = 0
def initialize(name)
@name = name
# Increment your class variable on line 8
@@people_count += 1
end
def self.number_of_instances
# Return your class variable on line 13
return @@people_count
end
end@@
class Person # Set your class variable to 0 on line 3 @@people_count = 0
def initialize(name)
@name = name
# Increment your class variable on line 8
\_\_\_\_\_\_
end
def self.number_of_instances
# Return your class variable on line 13
return @@people_count
end
end@@people_count += 1
class Car def \_\_\_\_\_(make, model) @make = make @model = model end end
kitt = Car.new(“Pontiac”, “Trans Am”)
initialize
class Person # Set your class variable to 0 on line 3 @@people_count = 0
def initialize(name)
@name = name
# Increment your class variable on line 8
@@people_count += 1
end
def \_\_\_\_\_.number_of_instances
# Return your class variable on line 13
return @@people_count
end
endself
class Person @@people_count = 0
def initialize(name)
@name = name
@@people_count += 1
end
def self.number_of_instances
return @@people_count
end
end
matz = Person.new("Yukihiro")
dhh = Person.new("David")puts “Number of Person instances: #_____”
{Person.number_of_instances}
class Message
@@messages_sent = 0
def initialize(from, to)
@from = from
@to = to
@@messages_sent += 1
end
endclass Email ____ Message
def initialize(from, to)
___
end
end
my_message = Message.new(“me”, “you”)
super