package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name;
int age;
int weight;
String address;
String color;
public void initialize(String name)
{
this.name = name;
this.age = 3;
this.weight = 5;
this.color = "waw";
this.address = null;
}
public void initialize (String name, int weight, int age,) {
this.name = name;
this.age = age;
this.weight = weight;
this.color = "eee";
this.address = null;
}
public void initialize(String name, int age)
{
this.name=name;
this.age=age;
this.weight=2;
this.color="gray";
this.address=null;
}
public void initialize(int weight, String color)
{
this.age = 5;
this.weight = weight;
this.color = color;
this.name = null;
this.address = null;
}
public void initialize(int weight, String color, String address)
{
this.age = 5;
this.weight = weight;
this.color = color;
this.address = address;
this.name = null;
}
public static void main(String[] args) {
}
}
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name;
int age;
int weight;
String address;
String color;
public void initialize(String name)
{
this.name = name;
this.age = 3;
this.weight = 5;
this.color = "waw";
this.address = null;
}
public void initialize (String name, int weight, int age,) {
this.name = name;
this.age = age;
this.weight = weight;
this.color = "eee";
this.address = null;
}
public void initialize(String name, int age)
{
this.name=name;
this.age=age;
this.weight=2;
this.color="gray";
this.address=null;
}
public void initialize(int weight, String color)
{
this.age = 5;
this.weight = weight;
this.color = color;
this.name = null;
this.address = null;
}
public void initialize(int weight, String color, String address)
{
this.age = 5;
this.weight = weight;
this.color = color;
this.address = address;
this.name = null;
}
public static void main(String[] args) {
}
}