netbeans keeps giving me these errors... \"Updating property file: /home/jd/NetB
ID: 3630465 • Letter: N
Question
netbeans keeps giving me these errors..."Updating property file: /home/jd/NetBeansProjects/midterm_2/build/built-jar.properties
Compiling 1 source file to /home/jd/NetBeansProjects/midterm_2/build/classes
/home/jd/NetBeansProjects/midterm_2/src/midterm_2.java:5: error: invalid method declaration; return type required
public Hexagon(double side) {
/home/jd/NetBeansProjects/midterm_2/src/midterm_2.java:40: error: reached end of file while parsing
return 1;
2 errors
/home/jd/NetBeansProjects/midterm_2/nbproject/build-impl.xml:603: The following error occurred while executing this line:
/home/jd/NetBeansProjects/midterm_2/nbproject/build-impl.xml:245: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)"
public class midterm_2 extends GeometricObject implements Comparable {
private double side;
/** Construct a Hexagon with the specified side */
public Hexagon(double side) {
// Implement it
this.side = side;
}
/** Implement the abstract method findArea in
GeometricObject */
public double findArea() {
// Implement it ( )
return 2.59807621 * this.side * this.side;
}
/** Implement the abstract method findPerimeter in
GeometricObject */
public double findPerimeter() {
// Implement it
return 6 * this.side;
}
/** Implement the compareTo method in
the Comparable interface to */
public int compareTo(Object obj) {
// Implement it (compare two Hexagons based on their areas)
if (this.side == ((midterm_2)obj).side) // Egual
return 0;
else if (this.side < ((midterm_2)obj).side) // Less than
return -1;
else // Greater than
return 1;