// Java interface definition public interface Interface { // Enumeration of chart types public enum eType { PIECHART, BARCHART, LINEGRAPH } // Method to read chart file public boolean readFile(String filename); // Method to get chart title public String getTitle (eType type); // Method to get chart labels public String[] getLabels(eType type); // Method to get chart data public double[] getData(eType type, int series); }After you import the interface into the project, Eclipse will show a compile error on the class. If you fly over the error with the mouse, Eclipse will give you the option to create a stub for each method, so that you don't have to type in all the method signatures. Letting Eclipse make the stubs ensures that all the methods will be correctly defined.
Field Type | Field Description |
---|---|
integer | Number of data items in pie chart |
integer | Number of data items in bar chart |
integer | Number of data items in line graph |
String[] | Sequence of labels for pie chart |
double[] | Sequence of data for pie chart |
double[] | First data sequence for bar chart |
double[] | Second data sequence for bar chart |
double[] | First data sequence for line graph |
double[] | Second data sequence for line graph |
double[] | Third data sequence for line graph |