Your task is to create two simple Java classes to represent an **Animal** and a **Dog**. This problem will help you understand **Inheritance** by showing how a Dog can inherit common traits from the Animal class.
Animal should be able to "make a sound".Dog should be able to "fetch a ball".Animal Class: This will be your parent class. It should have a public field for species and a public method makeSound() that prints "The animal makes a sound.".Dog Class: This will be your child class. It must **inherit** from the Animal class using the extends keyword. It should have its own public field for breed and a public method fetch() that prints "The dog fetches the ball.".Main: In your main method, create a single object of the Dog class.
makeSound() method (from the Animal class) and the fetch() method (from the Dog class) on the same dog object.Your main method must demonstrate the program works by testing the following scenario:
Dog object and set its species to "Canine" and its breed to "Labrador".fetch() method. The output should confirm the dog is fetching.makeSound() method. The output should confirm the animal is making a sound.Dog object has access to both its own methods and the methods it inherited from the Animal class.