Question: Implement the following Java interface. Submit both the interface code provided here and your class that implements the interface. **Note- take note of the return

Implement the following Java interface. Submit both the interface code provided here and your class that implements the interface. **Note- take note of the return value for any method in the interface. **if the return value is an array of double (double[ ]) this ** means that a new array is returned and the original **array is not changed. This is not a new requirement. **This is a clarification in case you did not remember **that an array is an object . For 50 points extra credit, implement this interface and also implement the same interface using generics (take out the some-me-up method).

/**

* This interface specifies several

* methods for operations on an array of double

* (or int) values.

*

* An interface in Java 7 is made up of method headings only.

* These are abstract methods. The interface is abstract as well but

* because the Java compiler already "knows" this, you do not use the

* keyword abstract in the class heading.

*

* If there are any fields specified, they must be public, static, and

final.

* Because an interface is abstract, an interface cannot be instantiated.

*

* An interface is used for design purposes and for allowing classes to

be considered

* various types. In Java, you can only inherit from one superclass, but

a class can implement

* many interfaces.

*

* What a programmer does is implement an interface. This means the

programmer must override every

* method in the interface.

*

* @author

* @version

*/

public interface ArrayFunctionsInterface

{

double [ ] sortMe(double [ ] array);

double getMax(double [ ] array);

double getMin(double [ ] array);

int whereAmI(double [ ] array, double searchValue);

double sumMeUp(double [ ] array);

double [ ] reverseMe(double [ ] array);

void printMe(double [ ] array);

double[ ] doubleMyCapacity(double [ ] array);

}

For 50 points extra credit, implement this interface and also implement the same interface using generics (take out the some-me-up method).

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!