Hey a questions about this challenge:
Why there are 2 classes in this challenge? class Solution & class Cat .. I thought there can/should be only 1 class per file or?
package com.codegym.task.task05.task0504;
/*
The Three "Muscateers"
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Cat cat1 = new Cat("dario",2,3,10);
Cat cat2 = new Cat("heio",3,35,30);
Cat cat3 = new Cat("dont",4,3,1);
}
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;
}
}
}