This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

constructor  RSS feed

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
author and iconoclast
Posts: 24203
43
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 { ...
 
mike hew
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, circle extends twodimensionshape, which extends to shape under the program
 
mike hew
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you can see, Circle DOESNOT extend to shape, and isnot suppose too!









 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Circle extends TwoDimensionalShape and TwoDimensionalShape extends Shape, then Circle also extends Shape
i.e.

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.
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!