+ 14
What are the "Max" and "gray" cases? When I add the "black" code shows an error!?
2 Answers
+ 3
You have an error because your constructor only takes two arguments: name and color. You are passing it 3 arguments when you add "black". The self keyword as "argument" in the contructor just refers to the current object.
Note that though the method bark was defined this way: bark(self) you called it with no argument: bark(). If you tried to call bark with an argument you will have an error as well.
+ 1
You are passing Three arguements insted of two. If You will pass only one color of your Dog class. This will compile.