Whales and cows

  • 3
  • Locked
In real life you would never confuse a whale and a cow. Sea cows (manatees) are sometimes encountered in Terranian waters, and that's not all you'll see on the planets of the Commonwealth! That said, in programming you can do whatever you want. Correctly write a getter for the Whale class, so that the program displays the phrase, "I'm not a cow. I'm a whale."
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
Abuzar Ansari
Level 0
8 February 2021, 05:39
ok
Nirali Rawal
Level 15 , Hopewell, United States
2 October 2019, 19:34
How exactly am I overriding the method? In the whale class I still had to write the getName method so i'm unsure how I overrided it. Also how would I nod call the getName method for cow if I wanted it to print "I'm a cow?"