Revisit Your Drawing
00:00
Let’s take another look at this little draft that I did earlier and just like figure out where we are at. Basically, the Animal
class, we implemented .eat()
and .talk()
already, so that’s great. .move()
is what we’re working on now.
00:15
Then the Dog
class, we’ve got .talk()
, so I had an idea of doing a little .fetch()
, so maybe we come back to that and look at this .fetch()
method later.
00:24
Pig
is implemented, basically. Sheep
is implemented.
00:29
We’re moving on to this other side of the draft where it’s about farm locations. Now the task talked about making a Field
and a Barn
, and I was thinking that this is a chance to do another type of inheritance with FarmLocation
and then implement a couple of instance methods on this: .enter()
, .exit()
, and keep a space for animals to go, and also define how big the spaces could be.
00:57
Let’s start this second-ish part off by implementing the draft of a FarmLocation
class and then also Field
and Barn
that are going to inherit from FarmLocation
.
Become a Member to join the conversation.