Question: 3. Create an interface named FlyingAnimal, which is a special superclass of some of animal classes (use the keyword interface to do so). Open

3. Create an interface named FlyingAnimal, which is a special superclass of some of animal classes (use the

3. Create an interface named FlyingAnimal, which is a special superclass of some of animal classes (use the keyword interface to do so). Open the editor and delete all the code placed in it automatically by BlueJ. Note that, an interface is a special form of an abstract class which does not implement any methods. In other words, all methods in interface by default are public and abstract. In Java, interface is used by implementing it by other classes. An interface can be implemented by several classes, and a class can implement several interfaces. This interface should contain the following methods: a. getWings (): This method returns int value and has no parameters. b. setWings (int wings): This is a void method and takes 1 parameters named wings. c. speed (): This is a void method and has no parameters. 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is the Java code defining the FlyingAnimal interface wi... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!