Question: To gain experience with using interfaces, complete the following steps: 1. Brainstorm an interface to create. Possibilities include: a. A generic category of things that

 To gain experience with using interfaces, complete the following steps: 1.Brainstorm an interface to create. Possibilities include: a. A generic category ofthings that has certain behaviors, but for which each variation of the

To gain experience with using interfaces, complete the following steps: 1. Brainstorm an interface to create. Possibilities include: a. A generic category of things that has certain behaviors, but for which each variation of the thing executes those behaviors differently. Ex: Category=Animal, variations=Butterfly, Hippo, behaviorseat, move, etc. b. An adjective of the form-able, which could describe many types of things. 2. In the repl.it project, create a new Interface. Give the signatures for the abstract methods your interface will include, 3. Now create a new class. Add private member variables to the class if necessary. Implement the abstract methods appropriately for this version of the interface. 4. Repeat Steps 2 and 3 at least one more time to create multiple classes that implement the interface differently. 5. Create a driver class that: 5. Create a driver class that: a. Declares ArrayList listName = new ArrayList(); b. Adds one or more instances of your implementing classes to the ArrayList. C. Includes a for-each loop for the elements of the ArrayList that invokes each of the methods of the interface. 6. Observe the results in computer science, we call this technique polymorphism. To submit this assignment, turn in hardcopies of 1. The interface 2. Each implementing class 3. Your driver 4. The Output You may combine one or more of the above onto a single page (if they fit nicely). (Be sure to document your code!)

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!