Code Lab

Mode entretien. Minuteur de 4 min, sans indices ni autocomplétion

Adam and Eve

FacileClasses4 min

Write the classes Human, Man and Woman. Man and Woman inherit from Human.

Also write a class God with a static method create(). It returns an array of two objects. The first is a Man object, the second a Woman object.

Exemples

God.create().length

Renvoie 2

God.create()[0] instanceof Man

Renvoie true

God.create()[1] instanceof Human

Renvoie true

A woman is a human too.

Source

Chargement de l'éditeur...
  1. create() returns an array of two objects
  2. The first object is a Man
  3. The second object is a Woman
  4. Both objects are humans

Les tests cachés se lancent à la soumission