Search:

Type: Posts; User: orbin

Search: Search took 0.24 seconds.

  1. Re: Having trouble dealing with objects using abstract methods/classes and polymorphi

    Do you mean that I should make the variables in Rectangle class public? If so, I did that and decided to use them in the right triangle class. This is the result.




    public class RightTriangle...
  2. Re: Having trouble dealing with objects using abstract methods/classes and polymorphi

    Yes I store the same variable in two places. In the constructor I needed to send the numbers back to the super, but I also had to use the variables in other methods within the class to do different...
  3. Re: Having trouble dealing with objects using abstract methods/classes and polymorphi

    I just read through the tips you guys gave me, and worked my code over again. This is what I have...but am I understanding what you were getting at?



    import java.util.Scanner;

    public class...
  4. Re: Having trouble dealing with objects using abstract methods/classes and polymorphi

    Thank you for helping out! I think I'm going to leave the assignment the way it is. I figure I get the point, but it still bugs me that I would have to set the objects to 0,0 to put a right triangle...
  5. Re: Having trouble dealing with objects using abstract methods/classes and polymorphi

    I don't understand how I can have just one parameter for a constructor if it extends the Rectangle class. Don't you have to also take in the width and length of the rectangle too for the super...
  6. Having trouble dealing with objects using abstract methods/classes and polymorphism

    We are supposed to create several classes including rectangle,square, and right triangle. Each class must have a uniform way of calling methods, hence abstract methods. What I don't understand is...
Results 1 to 6 of 6