Crazy eights

  • 1
  • Locked
The fact that cats were able to take over the Internet with ease shows that we are far from knowing everything about these cute balls of furs. The only obvious thing is that people without them are worse off than people with them. Let's make the world a better place: create 10 Cat variables and 8 more Cat objects. By the way, does anyone need a kitten?
You can't complete this task, because you're not signed in.
Comments (51)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Dav
Level 2 , United States of America
18 March, 11:27
since people are sharing their experiences. one of each "Cat variable" is given, one uninitialized and one initialized variable. I had added one more variable to the uninitialized punctuated as we should. Then added 7 more variables which I initialized to the value of the first initialized variable. I felt the pressure of trying to get the minimum number of tries, but was curious to see what would happen if I tried the different styles of declaration/initialization. ended up debugging more. lol. it is all learning.
Protsky
Level 7 , Switzerland
9 December 2021, 09:59
Crazy eights is difficult to interpret and the exercise is not understood very well.
Elias Daniel Hung
Level 4 , Caracas
26 June 2021, 21:05
Si tu lenguaje es español usa un navegador con traductor integrado que te ayude a traducir los ejercicios, solo la parte de la izquierda, Opera es una buena opción, con su respectiva extensión traductor de Google. Recuerda que cuando usas el comando new, como en Cat cat5 = new Cat(); estás inicializándo la variable, y creando el objeto, cuando creas una variable Cat como Cat cat5; por ejemplo, no creas un objeto, si se puede, ànimo... Estamos a la orden, saludos desde Venezuela.
Nuhazet
Level 4 , Santa Cruz de Tenerife, Spain
23 April, 08:03
Gracias por la orientación, estaba declarando las variables de otra manera
Ahmed Full Stack Developer
22 June 2021, 00:56
Create 8 object, and 2 variables you will be fine
Eros nullfeathers
Level 4 , Salt Lake City, United States
19 March 2021, 20:18
The title says "and" I though it mean 10 and 8, but it actually means 10 total so be careful. I guess for the sake of this all objects and instance variables are variables.
Forrest
Level 2 , Fort Worth, United States
7 December 2020, 21:21
1.) This is a declared variable WITH object assigned -------> Cat cat8 = new Cat(); <------------ Which you need to create 8 of them. 2.) This is a declared variable -------------> Cat cat9; <------------------ Which you need to create 10 of them. 8 of these 10 declared variables should have an object assigned to them. So you could simply start with.... Cat cat1 = new Cat(): Cat cat2 = new Cat(); etc; all the way until you get to Cat cat8 = new Cat(); Then, Cat cat9; Cat cat10; and stop, this will complete your task by creating a total of 10 Declared variables with 8 of them assigned an object. Hope this helps 👍
Jeff Kenney
Level 3 , United States
1 December 2021, 06:00
This is exactly what I did 👍
Mario Pacios Martínez
Level 3 , Ponferrada
21 November 2020, 17:30
I don't think that the problem is well defined. English is not my first language, but... I don't know. Maybe It's me
Elias Daniel Hung
Level 4 , Caracas
26 June 2021, 21:05
Si tu lenguaje es español usa un navegador con traductor integrado que te ayude a traducir los ejercicios, solo la parte de la izquierda, Opera es una buena opción, con su respectiva extensión traductor de Google. Recuerda que cuando usas el comando new, como en Cat cat5 = new Cat(); estás inicializándo la variable, y creando el objeto, cuando creas una variable Cat como Cat cat5; por ejemplo, no creas un objeto, si se puede, ànimo... Estamos a la orden, saludos desde Venezuela.
Rajamanjusha Amirapu
Level 3 , Albany, United States
30 August 2020, 22:56
we have to declare variable and create object in same line 8 times; we have to just declare variable 2 times; That becomes 10 variable declarations...and 8 object creations in total in the program...this resolved it for me after a few attempts.
arjunbanda
Level 3 , Providence, United States
13 June 2020, 17:12
All you have to do is keep two variable of cat uninitialized and 8 initialized
MK
Level 4 , Singapore, Singapore
9 May 2020, 16:41
An object instantiated is also an object variable. So you don't need exactly 18 of them.