package com.codegym.task.task02.task0213;
/*
Pets need people
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Woman woman = new woman();
Cat cat = new cat();
Dog dog = new dog();
Fish fish = new fish();
cat.owner = woman;
dog.owner = woman;
fish.owner = 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 {
}
}
inessa smets
Level 3
plz help: why is this not correct.
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
inessa smets
11 April 2019, 20:02
its oke
i found my problem
0
inessa smets
11 April 2019, 19:50
i fix it but is not correct
//write your code here
Woman woman = new Woman();
Cat cat = new Cat();
Dog dog = new Dog();
Fish fish = new Fish();
Cat.owner = Woman;
Dog.owner = Woman;
Fish.owner = Woman;
}
0
Guadalupe Gagnon
11 April 2019, 19:44
Download intelliJ, it would have instantly notified you that your code was incomplete. It is like a word processor for code.
new Woman(); <-- you need to initialize the class. The class is called 'Woman', not 'woman'.
same with all your object. Fix these.
0