Cats in the Universe

  • 2
  • Locked
In 2010, cats took control of the Internet, and in 3258 they achieved a soft coup of Planet PurPurr, which is at the center of the Galaxy Rush planetary system. A coup is soft when no one is against it. There was one problem: there were a lot of cats, and despite their dominant position, they essentially don't know how to count. Let's help them with a counter.
You can't complete this task, because you're not signed in.
Comments (8)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Level 15 , United States of America, United States
5 January 2022, 20:09
There is something I do not understand. I thought that a static class cannot be instantiated. So shouldn't the line: Cat cat1 = new Cat(); be wrong???
Eros nullfeathers
Level 4 , Salt Lake City, United States
12 April 2021, 03:36
Though im confused a bit using the "this" keyword, I got this right on the first try without help so i am learning something.
Level 19 , Moscow, Russia
4 May 2020, 15:13
I think, in this task a better way is to generate constructor that increase variable by one every time when instance of the class is made
HaeWon Chung
Level 17 , Boston, United States
15 January 2020, 22:55
I just repeat
Cat.count ++;
below each objects. I pass the task but for me it doesn't make sense. The code does not actually count the number of objects. It's ME that counts.
Cat.count ++;
must be somehow linked to the created object but I don't know how to do that.
Level 6 , Allentown, United States
9 March 2021, 21:47
Need to make sure the variable is declared the same.
Level 4 , Corpus Christi, United States
11 March 2021, 21:11
that works
Mike McKenna
Level 25 , Wilmington, United States
21 June 2019, 22:21
The word public & count++ play large part in task
Bryce Lindley
Level 9 , Olympia, United States
15 February 2019, 17:59
pull from method.. cat1.variable cat2.variable