NOTE: All classes must be properly documented. They must compile and work properly with the parent (or super) classes from which they are derived. You may need to use the Internet to find formulas to use.
no |
add an additional explicit value
constructor |
no |
the area of a Circle |
4pr2 yes |
4/3 pr3 |
just the constructor - there are no explicit abstract methods in Shape that need to be made concrete in ThreeDimensionalShape |
And which abstract methods? Why?
Should have these to guarantee
that children provide them but are not required to do so My example doesn’t have them. protected abstract double
getArea(); protected abstract double getVolume(); |
attributes – height, base (where
base is the side of a square), angleHeight volume – 1/3 *areaOfBase * height surface area – 4*triangleArea + base*base |
Pyramid is a child of ThreeDimensionalShape |
looking for an opinion to be
followed by a class discussion |