Challenge: Pet and Owner Relationship
Task
Swipe to start coding
- In the
mainmethod, create aPetobject calledGarfield. - Create an
Ownerobject namedBob. Assign Bob as the owner ofGarfield. - Create a
Petobject namedBen. - Create an
Ownerobject namedAlice. AssignAliceas the owner ofBen. - (Optional) You can also create your own pet and owner if you'd like.
Solution
solution.java
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.63
Challenge: Pet and Owner Relationship
Swipe to show menu
Task
Swipe to start coding
- In the
mainmethod, create aPetobject calledGarfield. - Create an
Ownerobject namedBob. Assign Bob as the owner ofGarfield. - Create a
Petobject namedBen. - Create an
Ownerobject namedAlice. AssignAliceas the owner ofBen. - (Optional) You can also create your own pet and owner if you'd like.
Solution
solution.java
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 2
single