These are flashcards an notes made by students on topics like 'method', 'totalarea' and 'operation', originating from:

- Michael Jesse Chonoles
ISBN-10 0128096403 ISBN-13 9780128096406
1335 Flashcards & Notes
  • This + 400k other summaries, also in PDF!
  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo

Study Cards on method, totalarea, operation

An operation on a superclass will be inherited by its subclasses.
Not only will the argument list be inherited, but  if...?
if any method is supplied (the method is the implementation of the operation), it will also be inherited.
Report
Even if the method is available on the superclass, it can be....?
Even if the method is available on the superclass, it can be overridden on the subclasses by simply supplying a method anywhere the default method is not sufficient.
Report
If we looked at the code of FigureManager.getDiagramArea()  , what would we see?
If we looked at the code of FigureManager.getDiagramArea(), we would see something like:

totalArea = 0

loop over GeometricFigures in ordered set of Figure:GeometricFigures

get next GeometricFigure

totalArea = totalArea = GeometricFigure.getArea()

endLoop

return totalArea
Report
Why is polymorphism a big advantage?
Polymorphism is a big advantage for object-oriented development, as changes do not propagate, and testing the type of an object is often not needed.

It incorporates information hiding, i.e., the details of the getArea() operation are not exposed outside of the Circle or Square
Report
  • Higher grades + faster learning
  • Don't study anything twice
  • 100% sure, 100% understanding
Discover Study Smart