If it was for me, i wouldn't have Point. Instead, i would have Square extend Shape.
Type: Posts; User: abnerb86
If it was for me, i wouldn't have Point. Instead, i would have Square extend Shape.
this is Shape
public abstract class Shape implements Comparable{
public double area() { return 0.0; }
public double volume() { return 0.0; }
public abstract String getName();
...
I understand what you are saying. This whole project confused me. We had been adding shapes to the package for 2 weeks, so he wanted to us implement Comparable to Shape, and do a selection sort to...
That's the same question i ask myself. The teacher wants us to have a point that extends shape, and square extends point. So x and y are variables that square inherits from point. I don't know how...
Hello everyone,
I have this assignment for my Java class:
1. Make your Shapes comparable add: "implements Comparable" and create the method: public int compareTo(Object o){ ... }
...