Зміст курсу
Java Extended
Java Extended
Animal Information Display Challenge
Завдання
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.
Дякуємо за ваш відгук!
Animal Information Display Challenge
Завдання
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.
Дякуємо за ваш відгук!
Animal Information Display Challenge
Завдання
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.
Дякуємо за ваш відгук!
Завдання
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.