Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Below is the Java code defining the FlyingAnimal interface wi...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started