Conteúdo do Curso
Java Extended
Java Extended
Challenge: Pet and Owner Relationship
Swipe to show code editor
- In the
main
method, create aPet
object calledGarfield
. - Create an
Owner
object namedBob
. Assign Bob as the owner ofGarfield
. - Create a
Pet
object namedBen
. - Create an
Owner
object namedAlice
. AssignAlice
as the owner ofBen
. - (Optional) You can also create your own pet and owner if you'd like.
Obrigado pelo seu feedback!
Challenge: Pet and Owner Relationship
Swipe to show code editor
- In the
main
method, create aPet
object calledGarfield
. - Create an
Owner
object namedBob
. Assign Bob as the owner ofGarfield
. - Create a
Pet
object namedBen
. - Create an
Owner
object namedAlice
. AssignAlice
as the owner ofBen
. - (Optional) You can also create your own pet and owner if you'd like.
Obrigado pelo seu feedback!
Challenge: Pet and Owner Relationship
Swipe to show code editor
- In the
main
method, create aPet
object calledGarfield
. - Create an
Owner
object namedBob
. Assign Bob as the owner ofGarfield
. - Create a
Pet
object namedBen
. - Create an
Owner
object namedAlice
. AssignAlice
as the owner ofBen
. - (Optional) You can also create your own pet and owner if you'd like.
Obrigado pelo seu feedback!
Swipe to show code editor
- In the
main
method, create aPet
object calledGarfield
. - Create an
Owner
object namedBob
. Assign Bob as the owner ofGarfield
. - Create a
Pet
object namedBen
. - Create an
Owner
object namedAlice
. AssignAlice
as the owner ofBen
. - (Optional) You can also create your own pet and owner if you'd like.