By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,709 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,709 IT Pros & Developers. It's quick & easy.

Help extending Shape class with Circle and Rectangle classes

P: 74
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
Share this Question
Share on Google+
1 Reply


P: 1
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.