Contenido del 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.
¡Gracias por tus comentarios!
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.
¡Gracias por tus comentarios!
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.
¡Gracias por tus comentarios!
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.