public class Solution {
public static void main(String[] args) {
//escreva seu código aqui
Cat cat = new Cat();
Dog dog = new Dog();
Fish fish = new Fish();
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 {
}
}
I don't know how to make Woman the owner of the pets - level 2 lesson 5
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
redmonkeyjuice
3 January 2020, 06:59
If you look at each of the pet classes: Dog, Fish, Cat, they all consist of a class variable "owner", which should point to a woman who is the owner of each of the pets.
+1
Guadalupe Gagnon
20 November 2019, 15:01
https://www.homeandlearn.co.uk/java/field_variables.html
+1