"Hello, Amigo! Here's another group of exercises on inheritance. Enjoy."

undefined
3
Task
Java Core, level 1, lesson 6
Locked
Horse and Pegasus
In ancient mythology, the winged horse Pegasus was born from a drop of Medusa's blood that fell to the earth. Other variations of the myth claim his father was Poseidon. Let's imagine for a moment, that rather than being created by a Greek God or Medusa's blood, that Pegasus' father was simply a horse. In this task, you'll need to edit the Horse and Pegasus classes to make Pegasus a descendant of Horse.
undefined
3
Task
Java Core, level 1, lesson 6
Locked
Pets
Among animal breeders and pet lovers, you'll occasionally find fans of iguanas, chinchillas, and other exotic animals. But just being on the spaceship GalaxyRush is exotic enough. So here folks prefer the more traditional cats and dogs. In this task, we'll create the Pet class and write descendants Cat and Dog for it.
undefined
3
Task
Java Core, level 1, lesson 6
Locked
Interplanetary farm
The spaceship GalaxyRush has crossed paths with the agro-ship Moo. The local farmers aren't bad people, but they don't understand a thing about programming. So, CodeGym students decided to help them out and started to write a program for keeping track of their livestock. Your task in this job is to create the Animal class and its descendants: Cow, Sheep, Bull, Goat, and Pig.
undefined
3
Task
Java Core, level 1, lesson 6
Locked
Hard workers
Even the most important executive was once a lowly noob. Let's imagine that you've taken a job as a secretary, but you hope to eventually become a manager. What do you, your manager, and the CEO all have in common? You are all employees. In this task, you need to create an Employee class, and make the rest of the classes inherit it.
undefined
3
Task
Java Core, level 1, lesson 6
Locked
IT company
CodeGym graduates have decided to form a startup that will write programs for a very important spaceport. But here's the problem: They have absolutely no time to write the software needed for their in-house needs. So, their mentor has arranged to have students on the second quest help with the project. You need to create a couple of employee classes and their descendants.