Зачем добавлена такая конструкция:
public Cat(String name, int age, int weight, int strength) {
this.name = name;
this.age = age;
this.weight = weight;
this.strength = strength;
Ведь раньше уже были определены все параметры класса Cat:
public static class Cat {
private String name;
private int age;
private int weight;
private int strength;
package com.javarush.task.task05.task0504;
/*
Трикотаж
*/
public class Solution {
public static void main(String[] args) {
Cat vaska = new Cat("vaska",3,30,8);
Cat tishka = new Cat("tishka",2,20,5);
Cat umka = new Cat("umka",5,40,9);//напишите тут ваш код
}
public static class Cat {
private String name;
private int age;
private int weight;
private int strength;
public Cat(String name, int age, int weight, int strength) {
this.name = name;
this.age = age;
this.weight = weight;
this.strength = strength;
}
}
}