Like cats and dogs

  • 3
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (2)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
shabarish kumar
Level 20 , Hyderabad, India
17 August 2019, 06:14
yes, I have a same doubt Benjamin. There is a flaw in this task.
Benjamin Winchester
Level 17 , Savannah, United States
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?