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
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 11
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 3.57
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
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 11
single