Create valid cats in an unnatural way: using constructors. Let's create a Cat class and declare five different constructors. The simplest constructor contains one parameter: name. The next has name and age. And we'll add weight to the third. Read about the rest in the task conditions.
You must be signed in to leave a comment
12 September 2022, 06:35
4 June 2020, 20:48
I still don't understand why constructors that only need name, for instance, still need me to make up values for the other variables, but for some reason it is ok for me not to add in anything for address.
9 March 2020, 14:56
This one is weird because for some of the constructors it forced me to manually put in a value. For others, it was OK if i used values initialized before any of the constructors. The second constructor was OK with grabbing an already initialized value but none of the rest were.
31 January 2020, 04:36
This is broken in intellij, I had to comment out //import javafx.css.converter.LadderConverter then it worked fine.