File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "constructor" Watch "constructor" New topic


mike hew

Joined: Oct 26, 2006
Posts: 27
I found I think my problem but not sure how to fix it, I was naming as shapes and not what was asked in the bold, could someone give me an example or where to go and look, the book I have is not a good teacher,

Thank you in advance.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Mike --

PLEASE stop starting new threads for this same exercise! Except for people that have talked to you already, nobody understands where you're coming from. If you left this all in one thread, then people would be able to see the context.

Now, anyway: the problem as I understood it was that Circle, Sphere, etc, need to extend Shape (if Shape is a class) or implement Shape (if Shape is an interface.) In other words:

public class Circle extends Shape { ...

[Jess in Action][AskingGoodQuestions]
mike hew

Joined: Oct 26, 2006
Posts: 27
no, circle extends twodimensionshape, which extends to shape under the program
mike hew

Joined: Oct 26, 2006
Posts: 27
As you can see, Circle DOESNOT extend to shape, and isnot suppose too!

Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
If Circle extends TwoDimensionalShape and TwoDimensionalShape extends Shape, then Circle also extends Shape

is perfectly legal.
Without digging out your original post, I'm not sure if that is what your problem is, but maybe it will help.

I agree. Here's the link:
subject: constructor
It's not a secret anymore!