Help extending Shape class with Circle and Rectangle classes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JWest46088
    New Member
    • Sep 2006
    • 74

    Help extending Shape class with Circle and Rectangle classes

    I am a little confused about what I need to do here. I created four separate classes (Circle, Rectangle, Square, and Triangle) that each calculate their own area and perimeter via user input.

    Now I have to extend the Shape class with Circle and Rectangle classes, first. Then, I have to extend Rectangle with Square and Triangle classes.

    Was I supposed to calculate the area and perimeter of the four shapes in the Shape class, or did I do it right? What should be in the Shape class?

    How do I extend the things above? I know you have to write public class Circle extends Shape, but do I have to put anything else in the body of the class for Shape?

    Sorry about all the questions, but I am so confused about what I have to do. If anybody can help me, it would be greatly appreciated, and thanks in advance!

    If you need to see code, let me know!
  • elangovasanthan
    New Member
    • Oct 2006
    • 1

    #2
    you please upload the code...


    then only we can find a solution...




    Regards ,

    ElangoVasanthan ...

    Comment

    Working...