ΠΏΡΠΎΡΡΠΎ Π½Π΅ ΠΏΡΠΎΡ
ΠΎΠ΄ΡΡ ΠΏΠ΅ΡΠ²ΡΠ΅ Π΄Π²Π° ΡΡΠ»ΠΎΠ²ΠΈΡ, Π½Π΅ Π·Π½Π°Ρ ΠΏΠΎΡΠ΅ΠΌΡ, ΡΠΆΠ΅ ΠΈΠ³ΡΠ°Π»ΡΡ Ρ ΡΡΠΈΠΌΠΈΠΌ ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΡΠΌΠΈ, Π½ΠΎ ΡΠΌΡΡΠ» ΡΠΎΡ ΠΆΠ΅, ΡΡΠΎ ΠΏΠΎΡΠ»Π΅Π΄Π½ΠΈΠ΅ ΡΡΠΈ ΡΡΠ»ΠΎΠ²ΠΈΡ ΠΏΡΠΎΡ
ΠΎΠ΄ΡΡ, Π° ΠΏΠ΅ΡΠ²ΡΠ΅ Π΄Π²Π° Π½Π΅Ρ .
package com.javarush.task.task05.task0510;
/*
ΠΠΎΡΠΊΠΎΠΈΠ½ΠΈΡΠΈΠ°ΡΠΈΡ
*/
public class Cat
{
String name;
int age;
String address;
String color;
int weight;
public void initialize( String name )
{
this.name = name;
this.age = 2;
this.weight = weight;
this.color = color;
}
public void initialize( String name, int weight, int age)
{
this.name = name;
this.weight = 3;
this.age = 3;
this.color = color ;
this.address = null;
}
public void initialize( String name, int age )
{
this.name = name;
this.age = age;
this.weight = weight;
this.color = color;
}
public void initialize( int weight, String color )
{
this.weight = weight;
this.color = color;
this.age = 2;
}
public void initialize( int weight, String color, String address )
{
this.weight = weight;
this.color = color;
this.address = address;
this.age = 2;
}
public static void main(String[] args) {
}
}