Cats and dogs aren't the best of friends, but they can get bored without one another. Let's not get in the way of their stormy relationship. We'll leave public the corresponding methods of the Cat and Dog classes. We'll hide the remaining methods as well as the internal variables - from sight and mischievous paws.
Like cats and dogs
- 3
Locked
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
shabarish kumar
17 August 2019, 06:14
yes, I have a same doubt Benjamin. There is a flaw in this task.
0
Benjamin Winchester
24 November 2018, 05:22
I have a question. If the cat's getSpeed method is private, can the dog object isCatNear method get the cat's speed to make the necessary comparison?
If no, then the exercise has a flaw. If yes, then how did making it private change anything?
+3