Initializing cats

  • 3
  • Locked
This task is dedicated to the mysterious and beautiful creatures we call cats. Create a Cat class and define five initializers (only name; name plus weight and age; only weight and color; name and age; weight, color, and address). We need valid cats: they can't exist without a weight and age. Alas, there are cats without names and homes.
You can't complete this task, because you're not signed in.
Comments (7)
  • Popular
  • New
  • Old
You must be signed in
Derek ALevel 5 , Columbus
30 June, 21:55
Why are we not just creating constructors to initialize objects vs using these initialize methods
Param MLevel 8 , Mumbai
27 June, 08:30
can anyone tell whats wrong in this
Muhammad VahhaajLevel 19 , Rawalpindi
8 June, 15:52
I think the term initialize should not be used like it's used here, because initialize is the terminology used for simultaneous declaration and assignment of value to a variable. i.e, int x = 5. Here the term assignment should be used as the field variables are already declared and we are assigning them values using methods. Don't you agree?
Todd MorlingLevel 8 , Philadelphia
25 March, 14:25
Why does String color need a default value but String name and String address can be left as null?
RomanLevel 41
11 April, 13:38
Vikrat RanaLevel 8 , Ludhiana
30 September 2018, 15:17
Can anyone tell me what's wrong in this??
RomanLevel 41
1 October 2018, 05:48
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at