470,573 Members | 1,692 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,573 developers. It's quick & easy.

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!
Oct 30 '06 #1
1 2694
you please upload the code...


then only we can find a solution...




Regards ,

ElangoVasanthan...
Oct 31 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Anthony Jones | last post: by
5 posts views Thread by Mark | last post: by
9 posts views Thread by Chrissy | last post: by
12 posts views Thread by adamurbas | last post: by
3 posts views Thread by hjast | last post: by
3 posts views Thread by hjast | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.