Object-Oriented Programming I Inheriting a Fortune

What’s wrong?

class Message
@@messages_sent = 0
def initialize(from, to)
@from = from
@to = to
@@messages_sent += 1
class Email < Message
def initialize(subject)
@subject = subject
my_message = Message.new(“me”,“you”)

superclass mismatch for class Email

1 Like

I have the exact same problem! Pretty sure that your code is right, can’t figure out what the issue is.

@teraslayer33670, did you ever figure out a solution?

I was able to get my code to run by closing out my browser, navigating back to the page and submitting again. Strange. I don’t know why that cleared up the class/superclass error but give it a shot if you have the same issue!

Try solving the 20th Question and come back and submit th 19th. It is working

I found it worked as soon as i removed the my_message = Message.new and submitted.

I assume this was something i was supposed to either remove or type over on the previous page, but threw me for a loop too.

Refreshing the page worked for me. Thanks!