Conteúdo do Curso
Java Extended
Java Extended
Challenge: Animal Information Display
Tarefa
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.
Obrigado pelo seu feedback!
Challenge: Animal Information Display
Tarefa
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.
Obrigado pelo seu feedback!
Challenge: Animal Information Display
Tarefa
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.
Obrigado pelo seu feedback!
Tarefa
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.