public class Solution {
public static void main(String[] args) {
Cat cat=new Cat();
Dog dog=new Dog();
Fish fish=new Fish();
cat.owner=Woman;
dog.owner=Woman;
fish.owner=Woman;
Woman woman=new Woman();
}
public static class Cat {
public Woman owner;
}
public static class Dog {
public Woman owner;
}
public static class Fish {
public Woman owner;
}
public static class Woman {
}
}
package com.codegym.task.task02.task0213;
/*
Pets need people
*/
public class Solution {
public static void main(String[] args) {
Cat cat=new Cat();
Dog dog=new Dog();
Fish fish=new Fish();
cat.owner=woman;
dog.owner=woman;
fish.owner=woman;
Woman woman=new Woman();
}
public static class Cat {
public Woman owner;
}
public static class Dog {
public Woman owner;
}
public static class Fish {
public Woman owner;
}
public static class Woman {
public String owner;
}
}