Contenido del Curso
Java Extended
Java Extended
Animal Information Display Challenge
Tarea
Your task is to bypass the private
access modifier and create two objects with the necessary parameters, then display them.
- Create two objects of the
Animal
class — one for a cat and one for a dog. - Use the
Animal(String type, String name, String color)
constructor to pass the parameterstype
,name
, andcolor
for each object. - After creating the objects, use
System.out.println()
to print information about each animal.
¡Gracias por tus comentarios!
Animal Information Display Challenge
Tarea
Your task is to bypass the private
access modifier and create two objects with the necessary parameters, then display them.
- Create two objects of the
Animal
class — one for a cat and one for a dog. - Use the
Animal(String type, String name, String color)
constructor to pass the parameterstype
,name
, andcolor
for each object. - After creating the objects, use
System.out.println()
to print information about each animal.
¡Gracias por tus comentarios!
Animal Information Display Challenge
Tarea
Your task is to bypass the private
access modifier and create two objects with the necessary parameters, then display them.
- Create two objects of the
Animal
class — one for a cat and one for a dog. - Use the
Animal(String type, String name, String color)
constructor to pass the parameterstype
,name
, andcolor
for each object. - After creating the objects, use
System.out.println()
to print information about each animal.
¡Gracias por tus comentarios!
Tarea
Your task is to bypass the private
access modifier and create two objects with the necessary parameters, then display them.
- Create two objects of the
Animal
class — one for a cat and one for a dog. - Use the
Animal(String type, String name, String color)
constructor to pass the parameterstype
,name
, andcolor
for each object. - After creating the objects, use
System.out.println()
to print information about each animal.