Search:

Type: Posts; User: abnerb86

Search: Search took 0.15 seconds.

  1. Replies
    9
    Views
    1,391

    Re: Inheritance variables

    If it was for me, i wouldn't have Point. Instead, i would have Square extend Shape.
  2. Replies
    9
    Views
    1,391

    Re: Inheritance variables

    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();
    ...
  3. Replies
    9
    Views
    1,391

    Re: Inheritance variables

    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...
  4. Replies
    9
    Views
    1,391

    Re: Inheritance variables

    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...
  5. Replies
    9
    Views
    1,391

    Inheritance variables

    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){ ... }
    ...
Results 1 to 5 of 5