Question: Lab Interface Download Lablnterface.zip from Canvas and extract the files (unzip it). Import the code into Eclipse In Package Explorer (Eclipse) right-click the folder that

 Lab Interface Download Lablnterface.zip from Canvas and extract the files (unzip
it). Import the code into Eclipse In Package Explorer (Eclipse) right-click the
folder that includes all your labs >Import the Import dialog opens -
Select General>File System and click Next the lmport from directory dialog opens
*User the Browse.. button to navigate to the directory that includes the

Lab Interface Download Lablnterface.zip from Canvas and extract the files (unzip it). Import the code into Eclipse In Package Explorer (Eclipse) right-click the folder that includes all your labs >Import the Import dialog opens - Select General>File System and click Next the lmport from directory dialog opens *User the Browse.. button to navigate to the directory that includes the extracted files - Check the folder on the left panel (LabInterface). All files on the right will be checked Ensure that the Create top-Level folder checkbox is checked Then click Finish Run App to make sure that the file import worked as expected - Create a new interface called Flyable Right-click labinterface > New > Interface In the new interface declare two methods called launch and land Both have a return type void, both have 0 parameters Remember: methods declared in an interface are implicitly public and abstract They need no access-modifier and they have no method body but a semi-colon after the method header * Change Bird, Hangglider, and Plane so that all three classes implement Flyable A wiggly line will appear Roll your mouse over the underlined class name and select Add unimplemented methods under the class name Eclipse will create the appropriate method stubs for you Implement the interface methods by printing the following messages- each terminated with a new line * Bird launch: Flapping the wings to take off Hangglider launch: Running until take-off * Plane launch: Rolling until take-off Bird land: Flapping the wings until landing Hangglider land: Gliding to a land Plane lane: Rolling to a stop In App add an empty line to structure the output OUTPUT: nyPlane: Boing 747 with 4 engines nyHangg1ider: Rigid-wing ysird: Swallow create an array of Flyable and name it flying Things Use an array initializer to initialize it with myPlane, myHangglider, and myBird Boing 747 with 4 engines Rolling until take-off Rolling to a stop .Use a foreach loop to loop through all the elements of flyingThings For each of the elements print the element and call both launch and land. Structure your output with single empty lines Rigid-wing Running until take-off Gliding to a land Swallow Flapping the wings to take off Flapping the wings until landing THE END package lablnterface; public class Hangglider private final boolean isRigidWing; public Hangglider(boolean rigidWing) isRigidWing rigidWing @Override public String toString) return String.format(isRigidWing? "Rigid- wing": "Flex-wing"); package lablnterface; public class Plane private final int numberOfEngines; private final String model; public Plane(int engines, String m) numberOfEngines engines; model m; @Override public String toString) return String.format("%s with %d engines", model, numberOfEngines); package lablnterface; public class App k* * @param args public static void main(String] args) Plane myPlane new Plane(4, "Boing 747"); System.out.printf("myPlane: %s%n", myPlane); Hangglider myHangglider nevw System.out.printf("myHanggl.der: %s%n", Hangglider(true); myHangglider); Bird myBird new Bird("Swallow"); System.out.printf("myBird: %5%n", myBird); package lablnterface public class Bird private final String type; public Bird(String t) type -t; @Override public String toString) return type

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!